mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 01:08:16 +00:00
SDL_test: add --gpu option
This commit is contained in:
@@ -72,6 +72,7 @@ static const char *video_usage[] = {
|
||||
"[--usable-bounds]",
|
||||
"[--utility]",
|
||||
"[--video driver]",
|
||||
"[--gpu driver]",
|
||||
"[--vsync]"
|
||||
};
|
||||
|
||||
@@ -615,6 +616,15 @@ int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
|
||||
state->hide_cursor = SDL_TRUE;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--gpu") == 0) {
|
||||
++index;
|
||||
if (!argv[index]) {
|
||||
return -1;
|
||||
}
|
||||
state->gpudriver = argv[index];
|
||||
SDL_SetHint(SDL_HINT_GPU_DRIVER, state->gpudriver);
|
||||
return 2;
|
||||
}
|
||||
} else {
|
||||
if (SDL_strcasecmp(argv[index], "--info") == 0) {
|
||||
++index;
|
||||
|
Reference in New Issue
Block a user