[Scummvm-git-logs] scummvm master -> 422e6390aa3f2d0134d1fbbc537235b406230497
elasota
noreply at scummvm.org
Mon May 8 00:56:30 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:
422e6390aa VCRUISE: Fix up default language behavior.
Commit: 422e6390aa3f2d0134d1fbbc537235b406230497
https://github.com/scummvm/scummvm/commit/422e6390aa3f2d0134d1fbbc537235b406230497
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-07T20:56:17-04:00
Commit Message:
VCRUISE: Fix up default language behavior.
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 02f8732b057..0e64c884cac 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1199,7 +1199,7 @@ bool Runtime::bootGame(bool newGame) {
Common::Language lang = Common::parseLanguage(ConfMan.get("language"));
- bool foundLang = false;
+ _languageIndex = 1;
if (_gameID == GID_REAH) {
_animSpeedRotation = Fraction(21, 1); // Probably accurate
@@ -1216,15 +1216,15 @@ bool Runtime::bootGame(bool newGame) {
Common::IT_ITA,
};
- _languageIndex = 1;
uint langCount = sizeof(langIndexes) / sizeof(langIndexes[0]);
for (uint li = 0; li < langCount; li++) {
if (langIndexes[li] == lang) {
_languageIndex = li;
- foundLang = true;
break;
}
+ if (langIndexes[li] == _defaultLanguage)
+ _languageIndex = li;
}
} else if (_gameID == GID_SCHIZM) {
const Common::Language langIndexes[] = {
@@ -1240,21 +1240,18 @@ bool Runtime::bootGame(bool newGame) {
Common::EN_USA,
};
- _languageIndex = 1;
uint langCount = sizeof(langIndexes) / sizeof(langIndexes[0]);
for (uint li = 0; li < langCount; li++) {
if (langIndexes[li] == lang) {
_languageIndex = li;
- foundLang = true;
break;
}
+ if (langIndexes[li] == _defaultLanguage)
+ _languageIndex = li;
}
}
- if (!foundLang)
- lang = _defaultLanguage;
-
Common::CodePage codePage = Common::CodePage::kWindows1252;
if (lang == Common::PL_POL)
More information about the Scummvm-git-logs
mailing list