CMI: Further smush syncing
|Reported by:||eriktorbjorn||Owned by:||aquadran|
|Cc:||Game:||Monkey Island 3|
Even with my previous sync patch, the opening video would get out of sync for me. It turned out that ScummRenderer::update() would occasionally get called with _wait already being set to false. As far as I can understand, this can only mean that my computer wasn't fast enough to finish drawing the previous frame before being told to draw the next one.
At 12 frames per second, it doesn't take many missed frames before it becomes quite noticeable.
For me, this happens occasionally even under normal load. I made my first experiments with smush syncing early in the morning, while my computer was running a number of disk-intensive cron jobs, which probably explains why I couldn't get it to work right then.
With this patch, the smush player will keep track of the number of pending updates instead, so that it can skip frames to "catch up". It works perfectly for me, but I guess that with a really slow computer you wouldn't see any frames at all. Maybe it should still draw the occasional frame, even if it's lagging behind?
Ticket imported from: #674566. Ticket imported from: patches/272.