mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
fix(windows): add experimental guest red-zone protection.
Port the static instruction patcher from shadPS4.
This commit is contained in:
@@ -64,6 +64,9 @@ static void PrintUsage() {
|
||||
::printf(" --spirv-debug-printf <true|false> Enable SPIR-V debug printf.\n");
|
||||
::printf(
|
||||
" --readback-linear-images <true|false> Read back writable linear images on submit.\n");
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
::printf(" --redzone Protect the guest SysV red zone.\n");
|
||||
#endif
|
||||
::printf(" --keymap <Pad=Key> DualSense mapping; may be repeated.\n");
|
||||
::printf(" --rd Enable RenderDoc capture.\n");
|
||||
}
|
||||
@@ -138,6 +141,13 @@ static bool ParseArgs(int argc, char* argv[], RunOptions& options, bool& show_he
|
||||
continue;
|
||||
}
|
||||
|
||||
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
|
||||
if (arg == "--redzone") {
|
||||
options.config.red_zone_protection_enabled = true;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!Common::StartsWith(arg, "--")) {
|
||||
::printf("game input must be provided with --game\n");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user