[Scummvm-git-logs] scummvm master -> 1043519df522f7d5cd36cc9f494956b30ce315d8

djsrv dservilla at gmail.com
Mon Jun 7 22:32:40 UTC 2021


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:
1043519df5 DIRECTOR: Avoid drawing previous frame


Commit: 1043519df522f7d5cd36cc9f494956b30ce315d8
    https://github.com/scummvm/scummvm/commit/1043519df522f7d5cd36cc9f494956b30ce315d8
Author: djsrv (dservilla at gmail.com)
Date: 2021-06-07T18:31:55-04:00

Commit Message:
DIRECTOR: Avoid drawing previous frame

The previous frame was getting drawn if video was playing. Only render
if we need to keep waiting before switching the frame.

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index d718be4ec2..cbc6a49688 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -304,30 +304,33 @@ void Score::update() {
 			_activeFade = 0;
 	}
 
-	if (_movie->_videoPlayback) {
-		renderFrame(_currentFrame);
-	}
-
 	if (!debugChannelSet(-1, kDebugFast)) {
-		if (_waitForChannel) {
-			if (_soundManager->isChannelActive(_waitForChannel))
-				return;
-
-			_waitForChannel = 0;
-		}
+		bool keepWaiting = false;
 
-		if (_waitForClick) {
+		if (_waitForChannel) {
+			if (_soundManager->isChannelActive(_waitForChannel)) {
+				keepWaiting = true; 
+			} else {
+				_waitForChannel = 0;
+			}
+		} else if (_waitForClick) {
 			if (g_system->getMillis() >= _nextFrameTime + 1000) {
 				_waitForClickCursor = !_waitForClickCursor;
 				_vm->setCursor(kCursorDefault);
 				_vm->setCursor(_waitForClickCursor ? kCursorMouseDown : kCursorMouseUp);
 				_nextFrameTime = g_system->getMillis();
 			}
-			return;
+			keepWaiting = true;
+		} else if (g_system->getMillis() < _nextFrameTime && !_nextFrame) {
+			keepWaiting = true;
 		}
 
-		if (g_system->getMillis() < _nextFrameTime && !_nextFrame)
+		if (keepWaiting) {
+			if (_movie->_videoPlayback) {
+				renderFrame(_currentFrame);
+			}
 			return;
+		}
 	}
 
 	// For previous frame




More information about the Scummvm-git-logs mailing list