From: RĂ©mi Verschelde Date: Sat, 11 Feb 2017 17:58:06 +0000 (+0100) Subject: Devtools: Fix toggling console out of devtools mode X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=919ccd0d70eab67f34ec14fe35925328f8413462;p=lugaru.git Devtools: Fix toggling console out of devtools mode --- 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(); + } } }