Skip to content

Commit

Permalink
Add borderless fullscreen option
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-karamanian authored and gnif committed Dec 15, 2017
1 parent d08fba9 commit 606da0a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ struct AppParams
bool allowResize;
bool keepAspect;
bool borderless;
bool fullscreen;
bool center;
int x, y;
unsigned int w, h;
Expand All @@ -87,6 +88,7 @@ struct AppParams params =
.allowResize = true,
.keepAspect = true,
.borderless = false,
.fullscreen = false,
.center = true,
.x = 0,
.y = 0,
Expand Down Expand Up @@ -667,6 +669,7 @@ int run()
params.h,
(
SDL_WINDOW_SHOWN |
(params.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) |
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
sdlFlags
Expand Down Expand Up @@ -891,7 +894,7 @@ void doLicense()
int main(int argc, char * argv[])
{
int c;
while((c = getopt(argc, argv, "hf:sc:p:jMmkanrdx:y:w:b:l")) != -1)
while((c = getopt(argc, argv, "hf:sc:p:jMmkanrdFx:y:w:b:l")) != -1)
switch(c)
{
case '?':
Expand Down Expand Up @@ -948,6 +951,10 @@ int main(int argc, char * argv[])
params.borderless = true;
break;

case 'F':
params.fullscreen = true;
break;

case 'x':
params.center = false;
params.x = atoi(optarg);
Expand Down

0 comments on commit 606da0a

Please sign in to comment.