From 86689e43977042dc5a5e82dc56b5e3e10013a766 Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 20 Apr 2006 03:17:01 +0000 Subject: [PATCH] Allow toggling fullscreen via pressing Alt + Enter git-svn-id: https://svn.eduke32.com/eduke32@74 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 8 ++++++++ polymer/eduke32/source/menus.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index cab837ed1..ecdc3c9df 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 3d4164b1b..82dfbdce7 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -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)