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

AndywinXp noreply at scummvm.org
Sat Jan 14 11:56:03 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:
a0a647c290 SCUMM: Properly sync voice mode flags between ScummVM and original GUI at startup


Commit: a0a647c290606ea3fa5f510dde5757d75b79fa6a
    https://github.com/scummvm/scummvm/commit/a0a647c290606ea3fa5f510dde5757d75b79fa6a
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-01-14T12:55:53+01:00

Commit Message:
SCUMM: Properly sync voice mode flags between ScummVM and original GUI at startup

Fixes #14027.

Changed paths:
    engines/scumm/scumm.cpp


diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 91b72ac5614..a668fa8bc33 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -231,10 +231,12 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
 		ConfMan.setBool("subtitles", true);
 
 	// TODO Detect subtitle only versions of scumm6 games
-	if (ConfMan.getBool("speech_mute"))
-		_voiceMode = 2;
-	else
-		_voiceMode = ConfMan.getBool("subtitles");
+	if (!isUsingOriginalGUI()) {
+		if (ConfMan.getBool("speech_mute"))
+			_voiceMode = 2;
+		else
+			_voiceMode = ConfMan.getBool("subtitles");
+	}
 
 	if (ConfMan.hasKey("render_mode")) {
 		_renderMode = Common::parseRenderMode(ConfMan.get("render_mode"));
@@ -1231,7 +1233,7 @@ Common::Error ScummEngine::init() {
 	resetScumm();
 	resetScummVars();
 
-	if (_game.version >= 5 && _game.version <= 7) {
+	if (_game.version >= 5 && _game.version <= 7 && _game.id != GID_DIG) {
 		_sound->setupSound();
 		// In case of talkie edition without sfx file, enable subtitles
 		if (!_sound->hasSfxFile() && !ConfMan.getBool("subtitles"))
@@ -1264,6 +1266,26 @@ void ScummEngine::setupScumm(const Common::String &macResourceFile) {
 		}
 	}
 
+	// Sync the voice mode options from the outside world (the ScummVM audio options tab)
+	if (_game.version >= 5 && _game.version <= 8) {
+		if (ConfMan.hasKey("subtitles", _targetName) && ConfMan.hasKey("speech_mute", _targetName)) {
+			bool speechMute = ConfMan.getBool("speech_mute", _targetName);
+			bool subtitles = ConfMan.getBool("subtitles", _targetName);
+
+			int resultingVoiceMode = 2; // Subtitles only
+
+			if (!speechMute && !subtitles) { // Voice only
+				resultingVoiceMode = 0;
+			} else if (!speechMute && subtitles) { // Text and voice
+				resultingVoiceMode = 1;
+			}
+
+			ConfMan.setInt("original_gui_text_status", resultingVoiceMode);
+			ConfMan.flushToDisk();
+			syncSoundSettings();
+		}
+	}
+
 	// On some systems it's not safe to run CD audio games from the CD.
 	if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) {
 		uint track;




More information about the Scummvm-git-logs mailing list