mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 00:41:12 +00:00
TINSEL: Fix bug #3459999 - "TINSEL: DW Crash in Subtitle Menu"
This commit is contained in:
parent
093a48989a
commit
4c3b4835aa
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user