mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
SDL_test_common: add other window flags: --shown, --hidden, --input-focus, --mouse-focus
This commit is contained in:
parent
d62ebec260
commit
9727655b89
@ -36,6 +36,7 @@ static const char *video_usage[] = {
|
||||
"[--min-geometry WxH]", "[--max-geometry WxH]", "[--logical WxH]",
|
||||
"[--scale N]", "[--depth N]", "[--refresh R]", "[--vsync]", "[--noframe]",
|
||||
"[--resizable]", "[--minimize]", "[--maximize]", "[--grab]", "[--keyboard-grab]",
|
||||
"[--shown]", "[--hidden]", "[--input-focus]", "[--mouse-focus]",
|
||||
"[--allow-highdpi]", "[--usable-bounds]"
|
||||
};
|
||||
|
||||
@ -424,6 +425,22 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
|
||||
state->window_flags |= SDL_WINDOW_MAXIMIZED;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--shown") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_SHOWN;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--hidden") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_HIDDEN;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--input-focus") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_INPUT_FOCUS;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--mouse-focus") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_MOUSE_FOCUS;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--grab") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_MOUSE_GRABBED;
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user