[Scummvm-git-logs] scummvm master -> 58f142d355a49107c75cc9d95e37824796f7b7dd

elasota noreply at scummvm.org
Mon Jun 5 21:28:19 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:
58f142d355 VCRUISE: Fix subtitle language defaulting to the ScummVM's language instead of the game language when no language is spe


Commit: 58f142d355a49107c75cc9d95e37824796f7b7dd
    https://github.com/scummvm/scummvm/commit/58f142d355a49107c75cc9d95e37824796f7b7dd
Author: elasota (ejlasota at gmail.com)
Date: 2023-06-05T17:27:54-04:00

Commit Message:
VCRUISE: Fix subtitle language defaulting to the ScummVM's language instead of the game language when no language is specified.  Add some more logging to diagnose character encoding issue with Russian DVD version.

Changed paths:
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index a3a78da878c..9a997ef2763 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1304,7 +1304,14 @@ bool Runtime::bootGame(bool newGame) {
 	_trayCompassGraphic = loadGraphic("Select_1", true);
 	_trayCornerGraphic = loadGraphic("Select_2", true);
 
-	Common::Language lang = Common::parseLanguage(ConfMan.get("language"));
+	Common::Language lang = _defaultLanguage;
+
+	if (ConfMan.hasKey("language")) {
+		lang = Common::parseLanguage(ConfMan.get("language"));
+		debug(2, "Using user-selected language %s", Common::getLanguageDescription(lang));
+	} else {
+		debug(2, "Defaulted language to %s", Common::getLanguageDescription(lang));
+	}
 
 	_languageIndex = 1;
 	_defaultLanguageIndex = 1;
@@ -1382,6 +1389,8 @@ bool Runtime::bootGame(bool newGame) {
 		}
 	}
 
+	debug(2, "Language index: %u   Default language index: %u", _languageIndex, _defaultLanguageIndex);
+
 	Common::CodePage codePage = Common::CodePage::kASCII;
 	resolveCodePageForLanguage(lang, codePage, _charSet);
 
@@ -1409,6 +1418,8 @@ bool Runtime::bootGame(bool newGame) {
 		}
 	}
 
+	debug(2, "Final language selection: %s   Code page: %i   Language index: %u", Common::getLanguageDescription(lang), static_cast<int>(codePage), _languageIndex);
+
 	if (subtitlesLoadedOK)
 		debug(1, "Localization data loaded OK");
 	else




More information about the Scummvm-git-logs mailing list