[Scummvm-git-logs] scummvm master -> adad81ada09633ed8b1d8864e70d358332fa7a2b
athrxx
noreply at scummvm.org
Wed Apr 1 17:04:01 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:
adad81ada0 SCI: fix broken ADGF_ADDENGLISH flag handling (part 2)
Commit: adad81ada09633ed8b1d8864e70d358332fa7a2b
https://github.com/scummvm/scummvm/commit/adad81ada09633ed8b1d8864e70d358332fa7a2b
Author: athrxx (athrxx at scummvm.org)
Date: 2026-04-01T19:02:00+02:00
Commit Message:
SCI: fix broken ADGF_ADDENGLISH flag handling (part 2)
Only the detection part was fixed in 87549b46 . This one here
will take care of the gui options update that takes place after
each start of the engine.
Changed paths:
common/language.cpp
common/language.h
engines/sci/metaengine.cpp
diff --git a/common/language.cpp b/common/language.cpp
index 79a82aff79f..bd3f2c96eca 100644
--- a/common/language.cpp
+++ b/common/language.cpp
@@ -184,6 +184,20 @@ const String getGameGUIOptionsDescriptionLanguage(Language lang) {
return String("lang_") + getLanguageDescription(lang);
}
+const String getGameGUIOptionsDescriptionLanguages(const List<Language> &languages) {
+ Common::String result;
+
+ for (const Language &lang : languages) {
+ if (lang != UNK_LANG)
+ result = result + getGameGUIOptionsDescriptionLanguage(lang) + " ";
+ }
+
+ if (result.lastChar() == ' ')
+ result.chop(1);
+
+ return result;
+}
+
List<Language> parseLanguagesFromGameGUIOptionsString(const String &optionsString) {
List<Language> result;
diff --git a/common/language.h b/common/language.h
index c76eb04cd14..ad5d70bfb68 100644
--- a/common/language.h
+++ b/common/language.h
@@ -105,11 +105,12 @@ extern const char *getLanguageLocale(Language id);
extern const char *getLanguageDescription(Language id);
// TODO: Document this GUIO related function
-const String getGameGUIOptionsDescriptionLanguage(Common::Language lang);
+const String getGameGUIOptionsDescriptionLanguage(Language lang);
+const String getGameGUIOptionsDescriptionLanguages(const List<Language> &languages);
List<Language> parseLanguagesFromGameGUIOptionsString(const String &optionsString);
// TODO: Document this GUIO related function
-bool checkGameGUIOptionLanguage(Common::Language lang, const String &str);
+bool checkGameGUIOptionLanguage(Language lang, const String &str);
List<String> getLanguageList();
diff --git a/engines/sci/metaengine.cpp b/engines/sci/metaengine.cpp
index 6ae26445403..7c8353b3d69 100644
--- a/engines/sci/metaengine.cpp
+++ b/engines/sci/metaengine.cpp
@@ -214,9 +214,13 @@ Common::Error SciMetaEngine::createInstance(OSystem *syst, Engine **engine, cons
#endif
*engine = new SciEngine(syst, desc, g->gameidEnum);
+ // Save the language info from the options string, since it will be overwritten in the next step.
+ const Common::String optStr = ConfMan.get("guioptions");
+ const Common::List<Common::Language> langList = Common::parseLanguagesFromGameGUIOptionsString(optStr);
+
// If the GUI options were updated, we catch this here and update them in the users config file transparently.
Common::updateGameGUIOptions(customizeGuiOptions(ConfMan.getPath("path"), desc->guiOptions, desc->platform, g->gameidStr, g->version),
- getGameGUIOptionsDescriptionLanguage(desc->language),
+ getGameGUIOptionsDescriptionLanguages(langList),
getGameGUIOptionsDescriptionPlatform(desc->platform));
return Common::kNoError;
More information about the Scummvm-git-logs
mailing list