aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-07-28 10:54:00 +0200
committerThierry Crozat2018-01-23 00:29:34 +0000
commitafb873c032af084958b3ec7227ed641392eff380 (patch)
tree9412e1a5e667f18f29f4dcaf0e6c717c20bae5d2
parentcf98468c32707d3fa93fa636dc78c151b3f8eb44 (diff)
downloadscummvm-rg350-afb873c032af084958b3ec7227ed641392eff380.tar.gz
scummvm-rg350-afb873c032af084958b3ec7227ed641392eff380.tar.bz2
scummvm-rg350-afb873c032af084958b3ec7227ed641392eff380.zip
SUPERNOVA: Adjusts game loop delay
-rw-r--r--engines/supernova/supernova.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index e1293c452d..cde54ab193 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -143,11 +143,14 @@ Common::Error SupernovaEngine::run() {
CursorMan.showMouse(true);
while (_gameRunning) {
+ uint32 start = _system->getMillis();
updateEvents();
_gm->executeRoom();
_console->onFrame();
_system->updateScreen();
- _system->delayMillis(_delay);
+ int end = _delay - (_system->getMillis() - start);
+ if (end > 0)
+ _system->delayMillis(end);
}
//deinit timer/sound/..