aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/kyra.cpp')
-rw-r--r--engines/kyra/kyra.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index f761efbe30..5895769b90 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -575,7 +575,7 @@ void KyraEngine::quitGame() {
}
void KyraEngine::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp) {
+ while (_system->getMillis() < timestamp && !_quitFlag) {
if (updateTimers)
updateGameTimers();
if (timestamp - _system->getMillis() >= 10)
@@ -661,10 +661,10 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) {
if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE))
_skipFlag = false;
- if (amount > 0 && !_skipFlag) {
+ if (amount > 0 && !_skipFlag && !_quitFlag) {
_system->delayMillis((amount > 10) ? 10 : amount);
}
- } while (!_skipFlag && _system->getMillis() < start + amount);
+ } while (!_skipFlag && _system->getMillis() < start + amount && !_quitFlag);
}