vulkan_sdl2: fix gpu=integrated|discrete

This commit is contained in:
Martin Pulec
2025-09-05 15:54:52 +02:00
parent 6357c3d878
commit 8fe80f402c

View File

@@ -675,12 +675,12 @@ bool parse_command_line_arguments(command_line_arguments& args, state_vulkan_sdl
constexpr auto pos = "driver="sv.size();
args.driver = std::string{ token.substr(pos) };
} else if (starts_with(token, "gpu=")) {
if (token == "integrated"sv) {
constexpr auto pos = "gpu="sv.size();
if (token.substr(pos) == "integrated"sv) {
args.gpu_idx = vulkan_display::gpu_integrated;
} else if (token == "discrete"sv) {
} else if (token.substr(pos) == "discrete"sv) {
args.gpu_idx = vulkan_display::gpu_discrete;
} else {
constexpr auto pos = "gpu="sv.size();
args.gpu_idx = svtoi(token.substr(pos));
}
} else if (starts_with(token, "pos=")) {