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: 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) if(ud.warp_on == 0)
Logo(); Logo();
else if(ud.warp_on == 1) else if(ud.warp_on == 1)

View file

@ -517,6 +517,14 @@ void menus(void)
long l,m; long l,m;
char *p = NULL; 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(); getpackets();
if(ControllerType == 1 && CONTROL_MousePresent) if(ControllerType == 1 && CONTROL_MousePresent)