diff options
Diffstat (limited to 'engines/cine/main_loop.cpp')
-rw-r--r-- | engines/cine/main_loop.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 04c6f5c769..e2402a4c8d 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -25,6 +25,7 @@ #include "common/scummsys.h" +#include "common/events.h" #include "common/system.h" #include "cine/main_loop.h" @@ -60,6 +61,9 @@ static void processEvent(Common::Event &event) { break; case Common::EVENT_MOUSEMOVE: break; + case Common::EVENT_QUIT: + exitEngine = 1; + break; case Common::EVENT_KEYDOWN: switch (event.kbd.keycode) { case Common::KEYCODE_RETURN: @@ -254,9 +258,13 @@ void purgeSeqList() { void CineEngine::mainLoop(int bootScriptIdx) { bool playerAction; + uint16 quitFlag; byte di; uint16 mouseButton; + quitFlag = 0; + exitEngine = 0; + if (_preLoad == false) { resetBgIncrustList(); @@ -410,7 +418,7 @@ void CineEngine::mainLoop(int bootScriptIdx) { if ("quit"[menuCommandLen] == (char)di) { ++menuCommandLen; if (menuCommandLen == 4) { - quitGame(); + quitFlag = 1; } } else { menuCommandLen = 0; @@ -419,7 +427,7 @@ void CineEngine::mainLoop(int bootScriptIdx) { manageEvents(); - } while (!quit() && _danKeysPressed != 7); + } while (!exitEngine && !quitFlag && _danKeysPressed != 7); hideMouse(); g_sound->stopMusic(); |