mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
GUI: Fix language popup in the game options.
r49786 introduced a regression which made the game options menu set the game language to "zh-cn" in case "<default>" was selected. Also in case no language key was present in the game's config domain no text was shown at all, now it shows "<default>" in that case again. svn-id: r55267
This commit is contained in:
parent
c0434258f9
commit
2633a70018
@ -188,8 +188,8 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
|
||||
// Language popup
|
||||
_langPopUpDesc = new StaticTextWidget(tab, "GameOptions_Game.LangPopupDesc", _("Language:"), _("Language of the game. This will not turn your Spanish game version into English"));
|
||||
_langPopUp = new PopUpWidget(tab, "GameOptions_Game.LangPopup", _("Language of the game. This will not turn your Spanish game version into English"));
|
||||
_langPopUp->appendEntry(_("<default>"), 0);
|
||||
_langPopUp->appendEntry("", 0);
|
||||
_langPopUp->appendEntry(_("<default>"), Common::UNK_LANG);
|
||||
_langPopUp->appendEntry("", Common::UNK_LANG);
|
||||
const Common::LanguageDescription *l = Common::g_languages;
|
||||
for (; l->code; ++l) {
|
||||
if (checkGameGUIOptionLanguage(l->id, _guioptionsString))
|
||||
@ -372,6 +372,8 @@ void EditGameDialog::open() {
|
||||
|
||||
if (ConfMan.hasKey("language", _domain)) {
|
||||
_langPopUp->setSelectedTag(lang);
|
||||
} else {
|
||||
_langPopUp->setSelectedTag(Common::UNK_LANG);
|
||||
}
|
||||
|
||||
if (_langPopUp->numEntries() <= 3) { // If only one language is avaliable
|
||||
|
Loading…
x
Reference in New Issue
Block a user