aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-01 02:09:12 +0100
committerMartin Kiewitz2016-02-01 02:09:12 +0100
commita3774072a3d6ee6aa2bba5f616d525d241c981e3 (patch)
tree2cb268025c46fde4e58dd25e97101703502a291f
parentc28e101cdbfcc28f080da245e49f5b764bb8fc44 (diff)
downloadscummvm-rg350-a3774072a3d6ee6aa2bba5f616d525d241c981e3.tar.gz
scummvm-rg350-a3774072a3d6ee6aa2bba5f616d525d241c981e3.tar.bz2
scummvm-rg350-a3774072a3d6ee6aa2bba5f616d525d241c981e3.zip
SCI: Revert ascii detection for key event handling
Seems to cause at least issues on AmigaOS probably b/c SDL. See bug #7009. Added FIXME. Underlying issue needs to get fixed in SDL backend or in SDL itself.
-rw-r--r--engines/sci/event.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 90ddaaf967..e8744b8f60 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -214,6 +214,8 @@ SciEvent EventManager::getScummVMEvent() {
//((ev.kbd.flags & Common::KBD_CAPS) ? SCI_KEYMOD_CAPSLOCK : 0) |
//((ev.kbd.flags & Common::KBD_SCRL) ? SCI_KEYMOD_SCRLOCK : 0) |
+ // FIXME: this hack should also not be here, see below
+#if 0
if (input.data >= Common::KEYCODE_KP0 && input.data <= Common::KEYCODE_KP9) {
if (!(ev.kbd.flags & Common::KBD_NUM)) {
// HACK: Num-Lock not enabled
@@ -222,8 +224,15 @@ SciEvent EventManager::getScummVMEvent() {
input.character = 0;
}
}
-
- if ((input.character) && (input.character <= 0xFF)) {
+#endif
+
+ // FIXME: using .ascii (.character) in here somewhat works on Windows+Linux, but it seems that
+ // at least SDL on AmigaOS returns valid .ascii characters when Fx keys are pressed etc.
+ // Check bug #7009. For now I reverted my changes. This needs to get fixed properly in backend / SDL itself.
+ // On Windows .ascii field gets values, when Fx keys are pressed as well, but it's above 0xFF.
+ // On AmigaOS it seems to return a value <= 0xFF.
+ //if ((input.character) && (input.character <= 0xFF)) {
+ if (!(input.data & 0xFF00)) {
// Directly accept most common keys without conversion
if ((input.character >= 0x80) && (input.character <= 0xFF)) {
// If there is no extended font, we will just clear the