[Scummvm-git-logs] scummvm master -> 7798bef8b92ce1a8b5211155b61dc29f4b996e35

sluicebox noreply at scummvm.org
Sun May 3 23:43:31 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:
7798bef8b9 SCI: Improve message type synchronization


Commit: 7798bef8b92ce1a8b5211155b61dc29f4b996e35
    https://github.com/scummvm/scummvm/commit/7798bef8b92ce1a8b5211155b61dc29f4b996e35
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2026-05-03T16:42:43-07:00

Commit Message:
SCI: Improve message type synchronization

Fixes clearing the SCI subtitle flag when skipping synchronization.

The code attempted to not sync the ScummVM "subtitles" config setting
to the SCI global subtitle flag when a CD game does not support
text+speech. That makes sense, as it could break a non-subtitle game
to set the subtitle flag.

But instead of skipping synchronization, the code always cleared the
subtitle flag. This can interfere with unknown variants where game
scripts have set the subtitle flag.

Now the subtitle flag is not modified when skipping synchronization.

Changed paths:
    engines/sci/engine/guest_additions.cpp


diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index fe78c41f090..49fac66a418 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -911,16 +911,23 @@ void GuestAdditions::syncMessageTypeFromScummVM() const {
 }
 
 void GuestAdditions::syncMessageTypeFromScummVMUsingDefaultStrategy() const {
-	uint8 value = 0;
-	if (ConfMan.getBool("subtitles")) {
-		value |= kMessageTypeSubtitles;
-	}
-	if (!ConfMan.getBool(("speech_mute"))) {
-		value |= kMessageTypeSpeech;
+	uint16 value = _state->variables[VAR_GLOBAL][kGlobalVarMessageType].getOffset();
+
+	// sync subtitle setting if this game supports speech and subtitles.
+	// otherwise, leave the existing value that game scripts have set.
+	if (_features->supportsSpeechWithSubtitles()) {
+		if (ConfMan.getBool("subtitles")) {
+			value |= kMessageTypeSubtitles;
+		} else {
+			value &= ~kMessageTypeSubtitles;
+		}
 	}
 
-	if (value == kMessageTypeSubtitles + kMessageTypeSpeech && !_features->supportsSpeechWithSubtitles()) {
-		value &= ~kMessageTypeSubtitles;
+	// sync speech setting
+	if (!ConfMan.getBool("speech_mute")) {
+		value |= kMessageTypeSpeech;
+	} else {
+		value &= ~kMessageTypeSpeech;
 	}
 
 	if (value) {




More information about the Scummvm-git-logs mailing list