diff options
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r-- | engines/toon/toon.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 79e153a7db..d2b98c2ed0 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -185,7 +185,7 @@ void ToonEngine::parseInput() { bool hasModifier = event.kbd.hasFlags(Common::KBD_ALT|Common::KBD_CTRL|Common::KBD_SHIFT); switch (event.type) { - case Common::EVENT_KEYUP: + case Common::EVENT_KEYDOWN: if ((event.kbd.ascii == 27 || event.kbd.ascii == 32) && !hasModifier) { _audioManager->stopCurrentVoice(); } @@ -588,6 +588,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { AudioStreamInstance *mainmenuMusic = NULL; bool musicPlaying = false; + _gameState->_inMenu = true; + while (!doExit) { clickingOn = MAINMENUHOTSPOT_NONE; clickRelease = false; @@ -700,6 +702,8 @@ bool ToonEngine::showMainmenu(bool &loadedGame) { } } + _gameState->_inMenu = false; + //delete mainmenuMusic; for (int entryNr = 0; entryNr < MAINMENU_ENTRYCOUNT; entryNr++) delete entries[entryNr].animation; @@ -2956,11 +2960,11 @@ void ToonEngine::pauseEngineIntern(bool pause) { } bool ToonEngine::canSaveGameStateCurrently() { - return !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); + return !_gameState->_inMenu && !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); } bool ToonEngine::canLoadGameStateCurrently() { - return !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); + return !_gameState->_inMenu && !_gameState->_inInventory && !_gameState->_inConversation && !_gameState->_inCutaway && !_gameState->_mouseHidden && !_moviePlayer->isPlaying(); } Common::String ToonEngine::getSavegameName(int nr) { |