From e195b8870771091147b95aea1d744e1a9f2b46a2 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 15 Oct 2009 13:30:18 +0000 Subject: [PATCH] SCI: kAnimate speed throttler fix svn-id: r45118 --- engines/sci/engine/kgraphics.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 180ca9d367e..7fc77bbdffe 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -941,10 +941,12 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) { uint32 curTime = g_system->getMillis(); uint32 duration = curTime - s->_lastAnimateTime; - if (duration < 50) { - gfxop_sleep(s->gfx_state, 50-duration); + if (duration < 40) { + gfxop_sleep(s->gfx_state, 40-duration); + s->_lastAnimateTime = g_system->getMillis(); + } else { + s->_lastAnimateTime = curTime; } - s->_lastAnimateTime = curTime; return s->r_acc; }