COMPOSER: Catch up with animations if we're starved of CPU time.

This commit is contained in:
Alyssa Milburn 2011-08-12 21:16:47 +02:00
parent d13b967376
commit b631104fd0

View file

@ -125,9 +125,9 @@ Common::Error ComposerEngine::run() {
}
if (lastDrawTime + frameTime <= thisTime) {
// catch up if we're more than 5 frames behind
if (lastDrawTime + (frameTime * 5) <= thisTime)
lastDrawTime = thisTime - (frameTime * 5);
// catch up if we're more than 2 frames behind
if (lastDrawTime + (frameTime * 2) <= thisTime)
lastDrawTime = thisTime;
else
lastDrawTime += frameTime;