mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-13 07:13:35 +00:00
test_common: add a --fill-document command line option.
Probably rarely used, but one _can_ specify command line options to an Emscripten program in its index.html wrapper, I think.
This commit is contained in:
@@ -59,6 +59,7 @@ static const char *video_usage[] = {
|
||||
"[--display N]",
|
||||
"[--flash-on-focus-loss]",
|
||||
"[--fullscreen | --fullscreen-desktop | --windows N]",
|
||||
"[--fill-document]",
|
||||
"[--geometry WxH]",
|
||||
"[--gldebug]",
|
||||
"[--grab]",
|
||||
@@ -248,6 +249,7 @@ static int SDLCALL SDLTest_CommonStateParseVideoArguments(void *data, char **arg
|
||||
return 0;
|
||||
}
|
||||
|
||||
// !!! FIXME: these should be else-ifs.
|
||||
if (SDL_strcasecmp(argv[index], "--video") == 0) {
|
||||
++index;
|
||||
if (!argv[index]) {
|
||||
@@ -290,6 +292,11 @@ static int SDLCALL SDLTest_CommonStateParseVideoArguments(void *data, char **arg
|
||||
state->window_flags |= SDL_WINDOW_VULKAN;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--fill-document") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_FILL_DOCUMENT;
|
||||
state->num_windows = 1;
|
||||
return 1;
|
||||
}
|
||||
if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) {
|
||||
state->window_flags |= SDL_WINDOW_FULLSCREEN;
|
||||
state->fullscreen_exclusive = true;
|
||||
|
||||
Reference in New Issue
Block a user