[Scummvm-git-logs] scummvm master -> 096e870b7bc15710a6650635cfea1b774303220b

peterkohaut peterkohaut at users.noreply.github.com
Sun Feb 24 19:54:39 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
096e870b7b BLADERUNNER: Fixed quick video playback in few occasions


Commit: 096e870b7bc15710a6650635cfea1b774303220b
    https://github.com/scummvm/scummvm/commit/096e870b7bc15710a6650635cfea1b774303220b
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-02-24T19:47:27+01:00

Commit Message:
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.

Changed paths:
    engines/bladerunner/vqa_player.cpp


diff --git a/engines/bladerunner/vqa_player.cpp b/engines/bladerunner/vqa_player.cpp
index 9a1c89a..040bb58 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;





More information about the Scummvm-git-logs mailing list