aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/toon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/toon/toon.cpp')
-rw-r--r--engines/toon/toon.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index a9b0d7aa5e..d7168c2843 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -421,8 +421,8 @@ void ToonEngine::render() {
// add a little sleep here if needed.
int32 newMillis = (int32)_system->getMillis();
- if(newMillis - _lastRenderTime < _tickLength) {
- int32 sleepMs = _tickLength - ( _system->getMillis() - _lastRenderTime );
+ if (newMillis - _lastRenderTime < _tickLength) {
+ int32 sleepMs = _tickLength - (newMillis - _lastRenderTime);
assert(sleepMs >= 0);
_system->delayMillis(sleepMs);
}