[Scummvm-git-logs] scummvm master -> cd5cd46c7fe31bcf84059a428ca095919c1607de

neuromancer noreply at scummvm.org
Sun Nov 9 21:54:38 UTC 2025


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

Summary:
a704877eae PRIVATE: Fix palette glitches when resuming video
0572210a8e PRIVATE: Fix stale screen when video ends
cd5cd46c7f PRIVATE: Fix SyncSound not redrawing screen


Commit: a704877eae7c3faedcdb52c7ed9882934283d773
    https://github.com/scummvm/scummvm/commit/a704877eae7c3faedcdb52c7ed9882934283d773
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-09T22:54:32+01:00

Commit Message:
PRIVATE: Fix palette glitches when resuming video

When resuming a video, or when playing a video from the casebook,
the outer screen frame was drawn after the video had already been
drawn to the screen. During that period, the wrong palette and
stale outer screen graphics were displayed.

Fixed by moving frame-drawing to drawScreen().

Introduced in 87966be0e7c7a63e6075daccab32bf7a8019727d

Changed paths:
    engines/private/private.cpp


diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 40e7cd42ee6..9334b6b9d0a 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -427,13 +427,6 @@ Common::Error PrivateEngine::run() {
 				stopSound(true);
 			}
 
-			if (_needToDrawScreenFrame && _videoDecoder->getCurFrame() >= 0) {
-				const byte *videoPalette = _videoDecoder->getPalette();
-				g_system->getPaletteManager()->setPalette(videoPalette, 0, 256);
-				drawScreenFrame(videoPalette);
-				_needToDrawScreenFrame = false;
-			}
-
 			if (_videoDecoder->endOfVideo()) {
 				delete _videoDecoder;
 				_videoDecoder = nullptr;
@@ -1997,10 +1990,14 @@ void PrivateEngine::drawScreen() {
 	if (_videoDecoder && !_videoDecoder->isPaused()) {
 		const Graphics::Surface *frame = _videoDecoder->decodeNextFrame();
 		Common::Point center((_screenW - _videoDecoder->getWidth()) / 2, (_screenH - _videoDecoder->getHeight()) / 2);
-		const byte *videoPalette = nullptr;
 
-		if (_videoDecoder->hasDirtyPalette()) {
-			videoPalette = _videoDecoder->getPalette();
+		if (_needToDrawScreenFrame && _videoDecoder->getCurFrame() >= 0) {
+			const byte *videoPalette = _videoDecoder->getPalette();
+			g_system->getPaletteManager()->setPalette(videoPalette, 0, 256);
+			drawScreenFrame(videoPalette);
+			_needToDrawScreenFrame = false;
+		} else if (_videoDecoder->hasDirtyPalette()) {
+			const byte *videoPalette = _videoDecoder->getPalette();
 			g_system->getPaletteManager()->setPalette(videoPalette, 0, 256);
 
 			if (_mode == 1) {


Commit: 0572210a8ebbe5fa680d4f5e5813d424c7b0f168
    https://github.com/scummvm/scummvm/commit/0572210a8ebbe5fa680d4f5e5813d424c7b0f168
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-09T22:54:32+01:00

Commit Message:
PRIVATE: Fix stale screen when video ends

Changed paths:
    engines/private/private.cpp


diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 9334b6b9d0a..91344882716 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -455,7 +455,14 @@ Common::Error PrivateEngine::run() {
 			_currentVS = "";
 			Gen::g_vm->run();
 			changeCursor("default");
-			drawScreen();
+
+			// Draw the screen once the VM has processed the last setting.
+			// This prevents the screen from flickering images as VM settings
+			// are executed. Fixes the previous screen from being displayed
+			// when a video finishes playing.
+			if (_nextSetting.empty()) {
+				drawScreen();
+			}
 		}
 
 		g_system->updateScreen();


Commit: cd5cd46c7fe31bcf84059a428ca095919c1607de
    https://github.com/scummvm/scummvm/commit/cd5cd46c7fe31bcf84059a428ca095919c1607de
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-11-09T22:54:32+01:00

Commit Message:
PRIVATE: Fix SyncSound not redrawing screen

Fixes Bitmap() not displaying an image when followed by SyncSound()

Changed paths:
    engines/private/funcs.cpp


diff --git a/engines/private/funcs.cpp b/engines/private/funcs.cpp
index 2fa78bad00d..3b8dd74ed8d 100644
--- a/engines/private/funcs.cpp
+++ b/engines/private/funcs.cpp
@@ -170,6 +170,8 @@ static void fSyncSound(ArgArray args) {
 	Common::String s = args[0].u.str;
 
 	if (s != "\"\"") {
+		g_private->drawScreen();
+
 		g_private->playSound(s, 1, true, false);
 		while (g_private->isSoundActive())
 			g_private->ignoreEvents();




More information about the Scummvm-git-logs mailing list