"tic80 -fullscreen" command line needed #418

This commit is contained in:
BADIM-PC\Vadim 2017-11-28 09:05:34 +03:00
parent 505e71e9f6
commit 769f5c4b0a
3 changed files with 8 additions and 5 deletions

View File

@ -2868,6 +2868,8 @@ void initConsole(Console* console, tic_mem* tic, FileSystem* fs, Config* config,
config->data.noSound = true;
else if(strcmp(argv[i], "-surf") == 0)
console->startSurf = true;
else if(strcmp(argv[i], "-fullscreen") == 0)
goFullscreen();
}
}

View File

@ -1371,7 +1371,7 @@ static void processMouse()
}
}
static void onFullscreen()
void goFullscreen()
{
studio.fullscreen = !studio.fullscreen;
SDL_SetWindowFullscreen(studio.window, studio.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
@ -1555,12 +1555,12 @@ static bool processShortcuts(SDL_KeyboardEvent* event)
studio.gamepad.backProcessed = true;
return true;
case SDLK_F11:
onFullscreen();
goFullscreen();
return true;
case SDLK_RETURN:
if(mod & KMOD_RALT)
{
onFullscreen();
goFullscreen();
return true;
}
break;
@ -1627,11 +1627,11 @@ static bool processShortcuts(SDL_KeyboardEvent* event)
return true;
}
break;
case SDLK_F11: onFullscreen(); return true;
case SDLK_F11: goFullscreen(); return true;
case SDLK_RETURN:
if(mod & KMOD_RALT)
{
onFullscreen();
goFullscreen();
return true;
}
else if(mod & TIC_MOD_CTRL)

View File

@ -199,3 +199,4 @@ void gotoCode();
void gotoSurf();
void exitFromGameMenu();
void runProject();
void goFullscreen();