diff options
author | Peter Kohaut | 2019-02-24 19:45:03 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-24 19:47:27 +0100 |
commit | 096e870b7bc15710a6650635cfea1b774303220b (patch) | |
tree | 53a18dd37c2180b99af76ea750212dbfc02cd67c /engines | |
parent | 902b2278a57c801c78d7edaa99db9df0f6c00a49 (diff) | |
download | scummvm-rg350-096e870b7bc15710a6650635cfea1b774303220b.tar.gz scummvm-rg350-096e870b7bc15710a6650635cfea1b774303220b.tar.bz2 scummvm-rg350-096e870b7bc15710a6650635cfea1b774303220b.zip |
BLADERUNNER: Fixed quick video playback in few occasions
Overlays were played too quickly after using KIA.
After outtakes finished, scene videos were playing too quickly.
When ScummVM was not updating game and it was not paused (eg window
drag) scene videos were played too quickly.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/vqa_player.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/bladerunner/vqa_player.cpp b/engines/bladerunner/vqa_player.cpp index 9a1c89a5bc..040bb5817c 100644 --- a/engines/bladerunner/vqa_player.cpp +++ b/engines/bladerunner/vqa_player.cpp @@ -132,12 +132,14 @@ int VQAPlayer::update(bool forceDraw, bool advanceFrame, bool useTime, Graphics: } } if (useTime) { - if (_frameNextTime == 0) { + _frameNextTime += 60000 / 15; + + // In some cases (as overlay paused by kia or game window is moved) new time might be still in the past. + // This can cause rapid playback of video where every refresh renders different frame of the video. + // Can be avoided by setting next time to the future. + if (_frameNextTime < now) { _frameNextTime = now + 60000 / 15; } - else { - _frameNextTime += 60000 / 15; - } } _frameNext++; result = _frame; |