diff options
Diffstat (limited to 'engines/sci/engine/kgraphics.cpp')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 22492d1718..8d26eda207 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -933,6 +933,16 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) { process_sound_events(s); s->_gui->animate(castListReference, cycle, argc, argv); + + // Do some speed throttling to calm down games that rely on counting cycles + uint32 curTime = g_system->getMillis(); + uint32 duration = curTime - s->_lastAnimateTime; + + if (duration < 50) { + g_system->delayMillis(50-duration); + } + s->_lastAnimateTime = curTime; + return s->r_acc; } |