[Scummvm-git-logs] scummvm master -> fe41c9bd7dfee3e16107bf88bf48eebf37059e35
criezy
criezy at scummvm.org
Fri Jul 16 20:23:56 UTC 2021
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:
fe41c9bd7d GUI: Fix loading fonts when translations are disabled
Commit: fe41c9bd7dfee3e16107bf88bf48eebf37059e35
https://github.com/scummvm/scummvm/commit/fe41c9bd7dfee3e16107bf88bf48eebf37059e35
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-07-16T21:23:29+01:00
Commit Message:
GUI: Fix loading fonts when translations are disabled
This fixes bug #12737.
The issue is that ThemeEngine::addFont was skipping every font
when translations are disabled, including those for the English
language. Indeed for those the function is called with language
of "*" (since this is what is specified in the theme) and not
an empty string as the implementation assumed.
Changed paths:
gui/ThemeEngine.cpp
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 8ec8ac4b26..9df06b6932 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -526,14 +526,14 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &language, const
if (!language.empty()) {
#ifdef USE_TRANSLATION
Common::String cl = TransMan.getCurrentLanguage();
+#else
+ Common::String cl("C");
+#endif
if (!cl.matchString(language, true))
return true; // Skip
if (_texts[textId] != nullptr) // We already loaded something
return true;
-#else
- return true; // Safely ignore
-#endif
}
if (_texts[textId] != nullptr)
More information about the Scummvm-git-logs
mailing list