diff options
author | Max Horn | 2003-05-14 23:28:56 +0000 |
---|---|---|
committer | Max Horn | 2003-05-14 23:28:56 +0000 |
commit | 885f28b6aed2229c48cc1f08ba4ed59df596fb0a (patch) | |
tree | 809bdef6491a0c18d9eb57a92cfeb099fe72839b /scumm/scummvm.cpp | |
parent | 10443a0fdbb4782733818bcf5c47b414f3427750 (diff) | |
download | scummvm-rg350-885f28b6aed2229c48cc1f08ba4ed59df596fb0a.tar.gz scummvm-rg350-885f28b6aed2229c48cc1f08ba4ed59df596fb0a.tar.bz2 scummvm-rg350-885f28b6aed2229c48cc1f08ba4ed59df596fb0a.zip |
cleanup
svn-id: r7518
Diffstat (limited to 'scumm/scummvm.cpp')
-rw-r--r-- | scumm/scummvm.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index e7cff5e514..fc93f83e7e 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -2162,8 +2162,7 @@ void Scumm::updatePalette() { void Scumm::mainRun() { int delta = 0; - int last_time = _system->get_msecs(); - int new_time; + int diff = 0; for(;;) { #ifdef __PALM_OS__ @@ -2171,12 +2170,14 @@ void Scumm::mainRun() { return; #endif updatePalette(); - _system->update_screen(); - new_time = _system->get_msecs(); - waitForTimer(delta * 15 + last_time - new_time); - last_time = _system->get_msecs(); + + waitForTimer(delta * 15 + diff); + + diff = _system->get_msecs(); delta = scummLoop(delta); + diff -= _system->get_msecs(); + if (delta < 1) // Ensure we don't get into a loop delta = 1; // by not decreasing sleepers. } |