X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=e737a4e95f3799cf42c9b3f33cdddbeb3c91bf72;hb=6c2be7b3030442d0ffda2d712ef2159283de2f22;hp=c1b038671b454c23beb94698377197e455d84ca6;hpb=8139604f6d9f7014ef516371895c72fabd55f828;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index c1b0386..e737a4e 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1024,27 +1024,30 @@ void Game::ProcessInput() /* Devtools */ if (devtools && !mainmenu) { - ProcessDevInput(); + /* Console */ + if (Input::isKeyPressed(consolekey)) { + console = !console; + if (console) { + OPENAL_SetFrequency(OPENAL_ALL); + } else { + freeze = 0; + waiting = false; + } + } + + /* Other devtools, disabled when the console is shown */ + if (!console) { + ProcessDevInput(); + } } } void Game::ProcessDevInput() { - if (!devtools || mainmenu) { + if (!devtools || mainmenu || console) { return; } - /* Console */ - if (Input::isKeyPressed(consolekey)) { - console = !console; - if (console) { - OPENAL_SetFrequency(OPENAL_ALL); - } else { - freeze = 0; - waiting = false; - } - } - if (Input::isKeyDown(SDL_SCANCODE_LALT)) { /* Enable editor */ if (Input::isKeyPressed(SDL_SCANCODE_M) && !Input::isKeyDown(SDL_SCANCODE_LSHIFT)) {