mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
SCUMM: GUI: Insert workaround for german LOOM FM-Towns
Fixes a part of bug #13980
This commit is contained in:
parent
e28e804a47
commit
6f4acceede
@ -1483,6 +1483,16 @@ void ScummEngine::queryQuit(bool returnToLauncher) {
|
||||
|
||||
convertMessageToString((const byte *)getGUIString(gsQuitPrompt), (byte *)msgLabelPtr, sizeof(msgLabelPtr));
|
||||
if (msgLabelPtr[0] != '\0') {
|
||||
|
||||
// WORKAROUND: In the german version of LOOM FM-Towns, the string in the game data is stored with a '\r'
|
||||
// character at the end. This means that the string being displayed on screen will end with "(J oder N)J",
|
||||
// and localizedYesKey will be assigned to '\r'. Let's fix this by truncating the relevant string.
|
||||
if (_enableEnhancements && _game.id == GID_LOOM &&
|
||||
_game.platform == Common::kPlatformFMTowns &&
|
||||
strstr(msgLabelPtr, "(J oder N)J\r")) {
|
||||
msgLabelPtr[Common::strnlen(msgLabelPtr, sizeof(msgLabelPtr)) - 1] = '\0';
|
||||
}
|
||||
|
||||
localizedYesKey = msgLabelPtr[Common::strnlen(msgLabelPtr, sizeof(msgLabelPtr)) - 1];
|
||||
msgLabelPtr[Common::strnlen(msgLabelPtr, sizeof(msgLabelPtr)) - 1] = '\0';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user