mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
cli: add --gpu <index> to select a Vulkan physical deviceFeature gpu select (#417)
* cli: add --gpu <index> to select a Vulkan physical device Select the Vulkan physical device by enumeration index, defaulting to automatic selection (-1). Invalid or out-of-range indices fall back to automatic selection with a clear message, and the selected device is logged. Co-Authored-By: Claude <noreply@anthropic.com> * cli: reject invalid --gpu index, translate comments, apply clang-format An invalid --gpu index now prints an error and exits with code 1 (usage), matching --user-id / --present-mode / --console-language. The automatic fallback is kept only for out-of-range indices detected at runtime. Comments translated to English and the touched files brought in line with clang-format (pre-commit v22.1.3). Co-Authored-By: Claude <noreply@anthropic.com> * cli: simplify Vulkan device selection --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
@@ -52,6 +52,8 @@ static void PrintUsage() {
|
||||
Config::DEFAULT_USER_ID);
|
||||
::printf(
|
||||
" --present-mode <value> Fifo, Mailbox, or Immediate. Default: Fifo.\n");
|
||||
::printf(
|
||||
" --gpu <index> Vulkan physical device index. Default: auto.\n");
|
||||
::printf(" --fullscreen Run in borderless desktop fullscreen.\n");
|
||||
::printf(" --vblank-frequency <num> Virtual vblank frequency. Default: 60.\n");
|
||||
::printf(" --console-language <0-29> Console language. Default: 1 (English US).\n");
|
||||
@@ -234,6 +236,8 @@ static bool ParseArgs(int argc, char* argv[], RunOptions& options, bool& show_he
|
||||
::printf("invalid present mode: %s\n", value.c_str());
|
||||
return false;
|
||||
}
|
||||
} else if (arg == "--gpu") {
|
||||
options.config.gpu_index = Common::ToInt32(value);
|
||||
} else if (arg == "--vblank-frequency") {
|
||||
const int32_t vblank_frequency = Common::ToInt32(value);
|
||||
options.config.vblank_frequency =
|
||||
|
||||
Reference in New Issue
Block a user