From 919ccd0d70eab67f34ec14fe35925328f8413462 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 11 Feb 2017 18:58:06 +0100 Subject: [PATCH] Devtools: Fix toggling console out of devtools mode --- Source/GameTick.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 0b83ced..e737a4e 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1022,20 +1022,23 @@ void Game::ProcessInput() printf("Stereo separation increased to %f\n", stereoseparation); } - /* Console */ - if (Input::isKeyPressed(consolekey)) { - console = !console; - if (console) { - OPENAL_SetFrequency(OPENAL_ALL); - } else { - freeze = 0; - waiting = false; + /* Devtools */ + if (devtools && !mainmenu) { + /* Console */ + if (Input::isKeyPressed(consolekey)) { + console = !console; + if (console) { + OPENAL_SetFrequency(OPENAL_ALL); + } else { + freeze = 0; + waiting = false; + } } - } - /* Devtools */ - if (devtools && !mainmenu && !console) { - ProcessDevInput(); + /* Other devtools, disabled when the console is shown */ + if (!console) { + ProcessDevInput(); + } } } -- 2.39.5