Allow toggling fullscreen via pressing Alt + Enter

git-svn-id: https://svn.eduke32.com/eduke32@74 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-20 03:17:01 +00:00
parent 4276901071
commit 86689e4397
2 changed files with 16 additions and 0 deletions

View File

@ -8440,6 +8440,14 @@ void app_main(int argc,char **argv)
MAIN_LOOP_RESTART:
if(ALT_IS_PRESSED && KB_KeyPressed(sc_Enter))
{
if(setgamemode(!ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP) < 0)
setgamemode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP);
else ScreenMode = !ScreenMode;
KB_ClearKeyDown(sc_Enter);
}
if(ud.warp_on == 0)
Logo();
else if(ud.warp_on == 1)

View File

@ -517,6 +517,14 @@ void menus(void)
long l,m;
char *p = NULL;
if(ALT_IS_PRESSED && KB_KeyPressed(sc_Enter))
{
if(setgamemode(!ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP) < 0)
setgamemode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP);
else ScreenMode = !ScreenMode;
KB_ClearKeyDown(sc_Enter);
}
getpackets();
if(ControllerType == 1 && CONTROL_MousePresent)