Add some shouldQuit() checks in event loops. This makes it possible to easily quit ScummVM (or doing an RTL), when failing the copy protection in Future Wars for example.

svn-id: r44225
This commit is contained in:
Johannes Schickel 2009-09-20 23:35:10 +00:00
parent 8daf7fbba8
commit 44359cd920

View File

@ -382,7 +382,7 @@ void CineEngine::mainLoop(int bootScriptIdx) {
do {
manageEvents();
getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16);
} while (mouseButton != 0);
} while (mouseButton != 0 && !shouldQuit());
menuVar = 0;
@ -391,14 +391,14 @@ void CineEngine::mainLoop(int bootScriptIdx) {
getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16);
playerAction = (mouseButton != 0) || processKeyboard(menuVar);
mainLoopSub6();
} while (!playerAction);
} while (!playerAction && !shouldQuit());
menuVar = 0;
do {
manageEvents();
getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16);
} while (mouseButton != 0);
} while (mouseButton != 0 && !shouldQuit());
waitForPlayerClick = 0;
}