]> git.jsancho.org Git - lugaru.git/commitdiff
Devtools: Fix toggling console out of devtools mode
authorRémi Verschelde <rverschelde@gmail.com>
Sat, 11 Feb 2017 17:58:06 +0000 (18:58 +0100)
committerRémi Verschelde <rverschelde@gmail.com>
Sat, 11 Feb 2017 17:58:37 +0000 (18:58 +0100)
Source/GameTick.cpp

index 0b83cedef7f4e3853d76b4f4bd27118ceb94e6c6..e737a4e95f3799cf42c9b3f33cdddbeb3c91bf72 100644 (file)
@@ -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();
+        }
     }
 }