[client] Add win:maximize to maximize on startup

This commit is contained in:
Jonathan (JJRcop) Rubenstein 2019-05-26 02:30:24 -04:00 committed by Geoffrey McRae
parent 9f33043d17
commit d07aa4b29e
5 changed files with 16 additions and 4 deletions

View File

@ -1 +1 @@
B1-rc1-0-g83c5df2c47+1
B1-rc2-1-g9f33043d17+1

View File

@ -98,6 +98,7 @@ Command line arguments will override any options loaded from the config files.
| win:keepAspect | -r | yes | Maintain the correct aspect ratio |
| win:borderless | -d | no | Borderless mode |
| win:fullScreen | -F | no | Launch in fullscreen borderless mode |
| win:maximize | -T | no | Launch window maximized |
| win:fpsLimit | -K | 200 | Frame rate limit (0 = disable - not recommended) |
| win:showFPS | -k | no | Enable the FPS & UPS display |
| win:ignoreQuit | -Q | no | Ignore requests to quit (ie: Alt+F4) |

View File

@ -167,6 +167,14 @@ static struct Option options[] =
.type = OPTION_TYPE_BOOL,
.value.x_bool = false,
},
{
.module = "win",
.name = "maximize",
.description = "Launch window maximized",
.shortopt = 'T',
.type = OPTION_TYPE_BOOL,
.value.x_bool = false,
},
{
.module = "win",
.name = "fpsLimit",
@ -376,6 +384,7 @@ bool config_load(int argc, char * argv[])
params.keepAspect = option_get_bool ("win", "keepAspect" );
params.borderless = option_get_bool ("win", "borderless" );
params.fullscreen = option_get_bool ("win", "fullScreen" );
params.maximize = option_get_bool ("win", "maximize" );
params.fpsLimit = option_get_int ("win", "fpsLimit" );
params.showFPS = option_get_bool ("win", "showFPS" );
params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );

View File

@ -1055,6 +1055,7 @@ int run()
(params.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) |
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
(params.maximize ? SDL_WINDOW_MAXIMIZED : 0) |
sdlFlags
)
);

View File

@ -80,6 +80,7 @@ struct AppParams
bool keepAspect;
bool borderless;
bool fullscreen;
bool maximize;
bool center;
int x, y;
unsigned int w, h;