[Scummvm-git-logs] scummvm master -> 8c9bf72f50a422aeb35e3046243e8d65c8b6a7c9

sev- noreply at scummvm.org
Mon Nov 27 22:51:39 UTC 2023


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:
8c9bf72f50 BBVS: Do not switch to 16-bit screen before video is opened. Bug #14615


Commit: 8c9bf72f50a422aeb35e3046243e8d65c8b6a7c9
    https://github.com/scummvm/scummvm/commit/8c9bf72f50a422aeb35e3046243e8d65c8b6a7c9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-11-27T14:51:02-08:00

Commit Message:
BBVS: Do not switch to 16-bit screen before video is opened. Bug #14615

On some, apparently "ripped off" versions of the game, where they
removed all videos, we are switching to 16-bit video too early.

This leads to a state when we switched to true color and attempt to set
up a palette which triggers an assert.

Noticed on Android devices. So, switching the screen initalization
around, so we do not request 16-bits mode too early.

Changed paths:
    engines/bbvs/videoplayer.cpp


diff --git a/engines/bbvs/videoplayer.cpp b/engines/bbvs/videoplayer.cpp
index 3e31171ade9..595d32f13de 100644
--- a/engines/bbvs/videoplayer.cpp
+++ b/engines/bbvs/videoplayer.cpp
@@ -35,6 +35,13 @@ void BbvsEngine::playVideo(int videoNum) {
 	else
 		videoFilename = Common::String::format("vid/video%03d.avi", videoNum - 1);
 
+	Video::VideoDecoder *videoDecoder = new Video::AVIDecoder();
+	if (!videoDecoder->loadFile(videoFilename)) {
+		delete videoDecoder;
+		warning("Unable to open video %s", videoFilename.c_str());
+		return;
+	}
+
 	// Set the correct video mode
 	initGraphics(320, 240, nullptr);
 	if (_system->getScreenFormat().bytesPerPixel == 1) {
@@ -44,13 +51,6 @@ void BbvsEngine::playVideo(int videoNum) {
 
 	debug(0, "Screen format: %s", _system->getScreenFormat().toString().c_str());
 
-	Video::VideoDecoder *videoDecoder = new Video::AVIDecoder();
-	if (!videoDecoder->loadFile(videoFilename)) {
-		delete videoDecoder;
-		warning("Unable to open video %s", videoFilename.c_str());
-		return;
-	}
-
 	videoDecoder->start();
 
 	bool skipVideo = false;




More information about the Scummvm-git-logs mailing list