SCI: kAnimate speed throttler fix

svn-id: r45118
This commit is contained in:
Martin Kiewitz 2009-10-15 13:30:18 +00:00
parent 4587b9bed8
commit e195b88707

View File

@ -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;
}