aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-01 02:17:47 +0100
committerMartin Kiewitz2016-02-01 02:17:47 +0100
commit83ad64f9475ee31e12f60d9c3dbe664030f75cae (patch)
tree4dc19c650a2afe82af7784c17e790c0bbb80208d /engines
parenta3774072a3d6ee6aa2bba5f616d525d241c981e3 (diff)
downloadscummvm-rg350-83ad64f9475ee31e12f60d9c3dbe664030f75cae.tar.gz
scummvm-rg350-83ad64f9475ee31e12f60d9c3dbe664030f75cae.tar.bz2
scummvm-rg350-83ad64f9475ee31e12f60d9c3dbe664030f75cae.zip
AGI: Keyboard handling change
It seems the current code causes issues on at least AmigaOS. Changed current code to the way SCI handled it. Needs to get investigated in detail. Added FIXME. Also see engines/sci/event.cpp
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/keyboard.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 07aec985c8..9fb837badb 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -136,6 +136,7 @@ void AgiEngine::processEvents() {
}
key = event.kbd.ascii;
+#if 0
if (event.kbd.keycode >= Common::KEYCODE_KP0 && event.kbd.keycode <= Common::KEYCODE_KP9) {
if (!(event.kbd.flags & Common::KBD_NUM)) {
// HACK: Num-Lock not enabled
@@ -144,8 +145,13 @@ void AgiEngine::processEvents() {
key = 0;
}
}
-
- if ((key) && (key <= 0xFF)) {
+#endif
+ // FIXME: Checking .ascii this way seems to cause issues on at least AmigaOS
+ // See bug #7009. For detailed information see engines/sci/event.cpp, EventManager::getScummVMEvent().
+ // For now we are using the same code as in SCI to make it work.
+ // Needs to get fixed in SDL backend / SDL itself.
+ //if ((key) && (key <= 0xFF)) {
+ if ((key) && (!(event.kbd.keycode & 0xFF00))) {
// No special key, directly accept it
// Is ISO-8859-1, we need lower 128 characters only, which is plain ASCII, so no mapping required
if (Common::isAlpha(key)) {