From 2c64485272dc8223aba3b770e77910f456a26fa9 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 5 Sep 2011 22:13:11 +0200 Subject: [PATCH] Toggle fullscreen mode with F11 or Alt+Enter. --- code/player.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/player.cpp b/code/player.cpp index f61ad95..353ee0d 100644 --- a/code/player.cpp +++ b/code/player.cpp @@ -342,6 +342,13 @@ void getPlayerInput() default: break; } + + if ((engine.keyState[SDLK_F11]) || ((engine.keyState[SDLK_RETURN]) && (engine.keyState[SDLK_LALT]))) + { + SDL_WM_ToggleFullScreen(screen); + engine.fullScreen = !engine.fullScreen; + engine.keyState[SDLK_F11] = engine.keyState[SDLK_LALT] = engine.keyState[SDLK_RETURN] = 0; + } } }