aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-09-21 17:06:57 +0200
committerEugene Sandulenko2019-09-21 17:07:15 +0200
commitc38600410e7ea5cf0bbb4edf11ccafa49f332f05 (patch)
tree504c3b1ca9a279d0f54887cac1f57d746ef48cc9
parent974c8b60e64e90524bc5735dd4e195534d5a61ee (diff)
downloadscummvm-rg350-c38600410e7ea5cf0bbb4edf11ccafa49f332f05.tar.gz
scummvm-rg350-c38600410e7ea5cf0bbb4edf11ccafa49f332f05.tar.bz2
scummvm-rg350-c38600410e7ea5cf0bbb4edf11ccafa49f332f05.zip
SCI: Support for Cyrillic input
-rw-r--r--engines/sci/event.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 7828bb5160..2700f54208 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -323,6 +323,16 @@ SciEvent EventManager::getScummVMEvent() {
break;
}
}
+
+ if (g_sci->getLanguage() == Common::RU_RUS) {
+ // Convert UTF16 to CP866
+ if (input.character >= 0x400 && input.character <= 0x4ff) {
+ if (input.character >= 0x440)
+ input.character = input.character - 0x410 + 0xb0;
+ else
+ input.character = input.character - 0x410 + 0x80;
+ }
+ }
}
// TODO: Leaky abstractions from SDL should not be handled in game engines!