mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 03:26:15 +08: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]",
|
"[--display N]",
|
||||||
"[--flash-on-focus-loss]",
|
"[--flash-on-focus-loss]",
|
||||||
"[--fullscreen | --fullscreen-desktop | --windows N]",
|
"[--fullscreen | --fullscreen-desktop | --windows N]",
|
||||||
|
"[--fill-document]",
|
||||||
"[--geometry WxH]",
|
"[--geometry WxH]",
|
||||||
"[--gldebug]",
|
"[--gldebug]",
|
||||||
"[--grab]",
|
"[--grab]",
|
||||||
@@ -248,6 +249,7 @@ static int SDLCALL SDLTest_CommonStateParseVideoArguments(void *data, char **arg
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// !!! FIXME: these should be else-ifs.
|
||||||
if (SDL_strcasecmp(argv[index], "--video") == 0) {
|
if (SDL_strcasecmp(argv[index], "--video") == 0) {
|
||||||
++index;
|
++index;
|
||||||
if (!argv[index]) {
|
if (!argv[index]) {
|
||||||
@@ -290,6 +292,11 @@ static int SDLCALL SDLTest_CommonStateParseVideoArguments(void *data, char **arg
|
|||||||
state->window_flags |= SDL_WINDOW_VULKAN;
|
state->window_flags |= SDL_WINDOW_VULKAN;
|
||||||
return 1;
|
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) {
|
if (SDL_strcasecmp(argv[index], "--fullscreen") == 0) {
|
||||||
state->window_flags |= SDL_WINDOW_FULLSCREEN;
|
state->window_flags |= SDL_WINDOW_FULLSCREEN;
|
||||||
state->fullscreen_exclusive = true;
|
state->fullscreen_exclusive = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user