diff --git a/VERSION b/VERSION index 1c6b0ac4..f462d3fc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-rc1-0-g83c5df2c47+1 \ No newline at end of file +B1-rc2-1-g9f33043d17+1 \ No newline at end of file diff --git a/client/README.md b/client/README.md index 3f85b9a4..8c16efb0 100644 --- a/client/README.md +++ b/client/README.md @@ -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) | diff --git a/client/src/config.c b/client/src/config.c index fc99a99a..142325dd 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -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" ); @@ -550,4 +559,4 @@ static char * optScancodeToString(struct Option * opt) char * str; alloc_sprintf(&str, "%d = %s", opt->value.x_int, SDL_GetScancodeName(opt->value.x_int)); return str; -} \ No newline at end of file +} diff --git a/client/src/main.c b/client/src/main.c index 214e6f0a..eff63547 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -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 ) ); @@ -1337,4 +1338,4 @@ int main(int argc, char * argv[]) config_free(); return ret; -} \ No newline at end of file +} diff --git a/client/src/main.h b/client/src/main.h index 9cf5e7ff..8cc0e61b 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -80,6 +80,7 @@ struct AppParams bool keepAspect; bool borderless; bool fullscreen; + bool maximize; bool center; int x, y; unsigned int w, h; @@ -127,4 +128,4 @@ struct KeybindHandle // forwards extern struct AppState state; -extern struct AppParams params; \ No newline at end of file +extern struct AppParams params;