mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] Add win:maximize to maximize on startup
This commit is contained in:
parent
9f33043d17
commit
d07aa4b29e
@ -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:keepAspect | -r | yes | Maintain the correct aspect ratio |
|
||||||
| win:borderless | -d | no | Borderless mode |
|
| win:borderless | -d | no | Borderless mode |
|
||||||
| win:fullScreen | -F | no | Launch in fullscreen 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:fpsLimit | -K | 200 | Frame rate limit (0 = disable - not recommended) |
|
||||||
| win:showFPS | -k | no | Enable the FPS & UPS display |
|
| win:showFPS | -k | no | Enable the FPS & UPS display |
|
||||||
| win:ignoreQuit | -Q | no | Ignore requests to quit (ie: Alt+F4) |
|
| win:ignoreQuit | -Q | no | Ignore requests to quit (ie: Alt+F4) |
|
||||||
|
@ -167,6 +167,14 @@ static struct Option options[] =
|
|||||||
.type = OPTION_TYPE_BOOL,
|
.type = OPTION_TYPE_BOOL,
|
||||||
.value.x_bool = false,
|
.value.x_bool = false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.module = "win",
|
||||||
|
.name = "maximize",
|
||||||
|
.description = "Launch window maximized",
|
||||||
|
.shortopt = 'T',
|
||||||
|
.type = OPTION_TYPE_BOOL,
|
||||||
|
.value.x_bool = false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.module = "win",
|
.module = "win",
|
||||||
.name = "fpsLimit",
|
.name = "fpsLimit",
|
||||||
@ -376,6 +384,7 @@ bool config_load(int argc, char * argv[])
|
|||||||
params.keepAspect = option_get_bool ("win", "keepAspect" );
|
params.keepAspect = option_get_bool ("win", "keepAspect" );
|
||||||
params.borderless = option_get_bool ("win", "borderless" );
|
params.borderless = option_get_bool ("win", "borderless" );
|
||||||
params.fullscreen = option_get_bool ("win", "fullScreen" );
|
params.fullscreen = option_get_bool ("win", "fullScreen" );
|
||||||
|
params.maximize = option_get_bool ("win", "maximize" );
|
||||||
params.fpsLimit = option_get_int ("win", "fpsLimit" );
|
params.fpsLimit = option_get_int ("win", "fpsLimit" );
|
||||||
params.showFPS = option_get_bool ("win", "showFPS" );
|
params.showFPS = option_get_bool ("win", "showFPS" );
|
||||||
params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
|
params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
|
||||||
@ -550,4 +559,4 @@ static char * optScancodeToString(struct Option * opt)
|
|||||||
char * str;
|
char * str;
|
||||||
alloc_sprintf(&str, "%d = %s", opt->value.x_int, SDL_GetScancodeName(opt->value.x_int));
|
alloc_sprintf(&str, "%d = %s", opt->value.x_int, SDL_GetScancodeName(opt->value.x_int));
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
@ -1055,6 +1055,7 @@ int run()
|
|||||||
(params.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) |
|
(params.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) |
|
||||||
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
|
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
|
||||||
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
|
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
|
||||||
|
(params.maximize ? SDL_WINDOW_MAXIMIZED : 0) |
|
||||||
sdlFlags
|
sdlFlags
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -1337,4 +1338,4 @@ int main(int argc, char * argv[])
|
|||||||
|
|
||||||
config_free();
|
config_free();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ struct AppParams
|
|||||||
bool keepAspect;
|
bool keepAspect;
|
||||||
bool borderless;
|
bool borderless;
|
||||||
bool fullscreen;
|
bool fullscreen;
|
||||||
|
bool maximize;
|
||||||
bool center;
|
bool center;
|
||||||
int x, y;
|
int x, y;
|
||||||
unsigned int w, h;
|
unsigned int w, h;
|
||||||
@ -127,4 +128,4 @@ struct KeybindHandle
|
|||||||
|
|
||||||
// forwards
|
// forwards
|
||||||
extern struct AppState state;
|
extern struct AppState state;
|
||||||
extern struct AppParams params;
|
extern struct AppParams params;
|
||||||
|
Loading…
Reference in New Issue
Block a user