diff options
author | Filippos Karapetis | 2012-07-15 16:54:29 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-07-15 16:54:59 +0300 |
commit | 4c3b4835aae1fe671253a65f6a10649c5ab2014c (patch) | |
tree | c23f4509725f6fe6c9d0bcaf0fb9e27fedb17743 /engines | |
parent | 093a48989a9cbdb88c5833299c2b574950d677a1 (diff) | |
download | scummvm-rg350-4c3b4835aae1fe671253a65f6a10649c5ab2014c.tar.gz scummvm-rg350-4c3b4835aae1fe671253a65f6a10649c5ab2014c.tar.bz2 scummvm-rg350-4c3b4835aae1fe671253a65f6a10649c5ab2014c.zip |
TINSEL: Fix bug #3459999 - "TINSEL: DW Crash in Subtitle Menu"
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/dialogs.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index fbe9e8d1f6..c33b412f6f 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1038,18 +1038,20 @@ static bool RePosition(); static bool LanguageChange() { LANGUAGE nLang = _vm->_config->_language; - if (_vm->getFeatures() & GF_USE_3FLAGS) { - // VERY quick dodgy bodge - if (cd.selBox == 0) - nLang = TXT_FRENCH; // = 1 - else if (cd.selBox == 1) - nLang = TXT_GERMAN; // = 2 - else - nLang = TXT_SPANISH; // = 4 - } else if (_vm->getFeatures() & GF_USE_4FLAGS) { - nLang = (LANGUAGE)(cd.selBox + 1); - } else if (_vm->getFeatures() & GF_USE_5FLAGS) { - nLang = (LANGUAGE)cd.selBox; + if ((_vm->getFeatures() & GF_USE_3FLAGS) || (_vm->getFeatures() & GF_USE_4FLAGS) || (_vm->getFeatures() & GF_USE_5FLAGS)) { + // Languages: TXT_ENGLISH, TXT_FRENCH, TXT_GERMAN, TXT_ITALIAN, TXT_SPANISH + // 5 flag versions include English + int selected = (_vm->getFeatures() & GF_USE_5FLAGS) ? cd.selBox : cd.selBox + 1; + // Make sure that a language flag has been selected. If the user has + // changed the language speed slider and hasn't clicked on a flag, it + // won't be selected. + if (selected >= 0 && selected <= 4) { + nLang = (LANGUAGE)selected; + + // 3 flag versions don't include Italian + if (selected >= 3 && (_vm->getFeatures() & GF_USE_3FLAGS)) + nLang = TXT_SPANISH; + } } if (nLang != _vm->_config->_language) { |