mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 00:45:10 +00:00
The language fallback now prefers the other english if USA or GRB was requested but wasn't found in the game data.
svn-id: r28237
This commit is contained in:
parent
806a0d9f0a
commit
d8e4d70b67
@ -672,18 +672,39 @@ byte *Game::loadLocTexts(int32 *dataSize) {
|
||||
|
||||
handle = openLocTextFile(locTextFile, _vm->_global->_languageWanted);
|
||||
if (handle >= 0) {
|
||||
|
||||
_foundTotLoc = true;
|
||||
_vm->_global->_language = _vm->_global->_languageWanted;
|
||||
}
|
||||
else if (!_foundTotLoc) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
handle = openLocTextFile(locTextFile, i);
|
||||
|
||||
} else if (!_foundTotLoc) {
|
||||
bool found = false;
|
||||
|
||||
if (_vm->_global->_languageWanted == 2) {
|
||||
handle = openLocTextFile(locTextFile, 5);
|
||||
if (handle >= 0) {
|
||||
_vm->_global->_language = i;
|
||||
break;
|
||||
_vm->_global->_language = 5;
|
||||
found = true;
|
||||
}
|
||||
} else if (_vm->_global->_languageWanted == 5) {
|
||||
handle = openLocTextFile(locTextFile, 2);
|
||||
if (handle >= 0) {
|
||||
_vm->_global->_language = 2;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
handle = openLocTextFile(locTextFile, i);
|
||||
if (handle >= 0) {
|
||||
_vm->_global->_language = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
debugC(1, kDebugFileIO, "Using language %d for %s",
|
||||
_vm->_global->_language, _curTotFile);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user