mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
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.
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user