diff options
author | Joseph-Eugene Winzer | 2017-07-28 10:54:00 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 00:29:34 +0000 |
commit | afb873c032af084958b3ec7227ed641392eff380 (patch) | |
tree | 9412e1a5e667f18f29f4dcaf0e6c717c20bae5d2 | |
parent | cf98468c32707d3fa93fa636dc78c151b3f8eb44 (diff) | |
download | scummvm-rg350-afb873c032af084958b3ec7227ed641392eff380.tar.gz scummvm-rg350-afb873c032af084958b3ec7227ed641392eff380.tar.bz2 scummvm-rg350-afb873c032af084958b3ec7227ed641392eff380.zip |
SUPERNOVA: Adjusts game loop delay
-rw-r--r-- | engines/supernova/supernova.cpp | 5 |
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/.. |