From 9727655b896b69e73b187815d0a4e1fc68701128 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 26 Apr 2021 14:22:19 +0200 Subject: [PATCH] SDL_test_common: add other window flags: --shown, --hidden, --input-focus, --mouse-focus --- src/test/SDL_test_common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c index 6c21439eb..0b5bc0e62 100644 --- a/src/test/SDL_test_common.c +++ b/src/test/SDL_test_common.c @@ -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;