[Scummvm-git-logs] scummvm master -> 747f2f8e8578c01e282d3e19d00e102d22458cbd

bluegr noreply at scummvm.org
Mon Aug 10 12:48:04 UTC 2026


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

Summary:
747f2f8e85 BURIED: Fix buggy transition in Chateau Gaillard


Commit: 747f2f8e8578c01e282d3e19d00e102d22458cbd
    https://github.com/scummvm/scummvm/commit/747f2f8e8578c01e282d3e19d00e102d22458cbd
Author: Kevin Howald (kevin.howald at gmail.com)
Date: 2026-08-10T15:48:01+03:00

Commit Message:
BURIED: Fix buggy transition in Chateau Gaillard

Fix an issue that could cause an incorrect still frame to be drawn
after a video transition. At the end of the `videoTransition`
method, the movie's video window is deleted. VideoWindow extends
form Window, which itself invalidates the screen's contents in
its destructor. This causes an erroneous frame draw to the
screen using the *new* still frames loaded during the transition
but using the *old* scene's location data.

Assisted-by: Gemini:Gemini 3.6 Flash
Assisted-by: Claude:Claude Sonnet 4.6

Changed paths:
    engines/buried/scene_view.cpp


diff --git a/engines/buried/scene_view.cpp b/engines/buried/scene_view.cpp
index d51cb8d1239..f3ca3ba0688 100644
--- a/engines/buried/scene_view.cpp
+++ b/engines/buried/scene_view.cpp
@@ -1089,17 +1089,22 @@ bool SceneViewWindow::videoTransition(const Location &location, DestinationScene
 		return true;
 	}
 
-	animationMovie.reset();
-
-	if (audioStream)
-		_vm->_sound->restart();
-
+	// Update `_preBuffer` with the destination background and push it to the screen BEFORE
+	// destroying the video window. Resetting animationMovie triggers an immediate window repaint.
+	// Blitting newBackground into _preBuffer here ensures that when the movie ends, the display
+	// shows the intended target destination frame rather than stale video content.
 	if (newBackground) {
 		_vm->_gfx->crossBlit(_preBuffer, 0, 0, 432, 189, newBackground, 0, 0);
 		newBackground->free();
 		delete newBackground;
+		newBackground = nullptr;
 	}
 
+	animationMovie.reset();
+
+	if (audioStream)
+		_vm->_sound->restart();
+
 	_paused = false;
 
 	return true;
@@ -2381,6 +2386,14 @@ void SceneViewWindow::onKeyUp(const Common::KeyState &key, uint flags) {
 }
 
 void SceneViewWindow::onPaint() {
+	// Bypass scene-specific painting while a transition animation or cutscene is playing.
+	// During active transitions, the scene view is in a transient state. Painting at that time
+	// can cause access of frame data with mismatched data e.g. post-transition still frame data
+	// indexed using pre-transition frame information.
+	if (_paused) {
+		return;
+	}
+
 	// Original didn't draw if the async movie was playing, but that doesn't seem right.
 	if (_currentScene && !_infoWindowDisplayed && !_bioChipWindowDisplayed) {
 		if (_currentScene->_staticData.navFrameIndex >= -1) {




More information about the Scummvm-git-logs mailing list