aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/events.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-11 23:42:20 -0400
committerPaul Gilbert2014-03-11 23:42:20 -0400
commit709fcc6fac4e1449064c4ddd5de3c443d0290c93 (patch)
treee2ef6eabfb8bc82faffa847f26953524bf2c8fb7 /engines/mads/events.cpp
parent2d99f761f0bb0a8db4468846f0643fbdc4da450a (diff)
downloadscummvm-rg350-709fcc6fac4e1449064c4ddd5de3c443d0290c93.tar.gz
scummvm-rg350-709fcc6fac4e1449064c4ddd5de3c443d0290c93.tar.bz2
scummvm-rg350-709fcc6fac4e1449064c4ddd5de3c443d0290c93.zip
MADS: Fix inter-frame wait loop
Diffstat (limited to 'engines/mads/events.cpp')
-rw-r--r--engines/mads/events.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/mads/events.cpp b/engines/mads/events.cpp
index 59cdfbfffb..182d6cbea7 100644
--- a/engines/mads/events.cpp
+++ b/engines/mads/events.cpp
@@ -36,7 +36,6 @@ EventsManager::EventsManager(MADSEngine *vm) {
_vm = vm;
_cursorSprites = nullptr;
_frameCounter = 0;
- _frameNumber = 0;
_priorFrameTime = 0;
_keyPressed = false;
_mouseClicked = false;
@@ -166,8 +165,8 @@ void EventsManager::delay(int cycles) {
}
void EventsManager::waitForNextFrame() {
- uint32 frameNum = getFrameCounter();
- while (!_vm->shouldQuit() && !_vm->_game->_abortTimers && frameNum == _frameNumber)
+ uint32 frameCtr = getFrameCounter();
+ while (!_vm->shouldQuit() && frameCtr == _frameCounter)
delay(1);
}