aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authordhewg2011-03-20 13:29:21 +0100
committerdhewg2011-03-20 13:29:21 +0100
commitc77e7f75a66c5236347fc6fc907e67f053a048fb (patch)
tree4ad7e8058833358a26a853d37708e5bc5154e96a /backends/platform
parent948c97f31bf9d5c6b80b35739964ec5edcbb3102 (diff)
downloadscummvm-rg350-c77e7f75a66c5236347fc6fc907e67f053a048fb.tar.gz
scummvm-rg350-c77e7f75a66c5236347fc6fc907e67f053a048fb.tar.bz2
scummvm-rg350-c77e7f75a66c5236347fc6fc907e67f053a048fb.zip
ANDROID: Trust ASCII kbd codes on unknown keys
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/android/events.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 5fc10b2161..c969068d70 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -352,14 +352,20 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
}
if (arg2 < 1 || arg2 > ARRAYSIZE(jkeymap)) {
- LOGE("received invalid keycode: %d (%d)", arg2, arg3);
- return;
+ if (arg3 < 1) {
+ LOGE("received invalid keycode: %d (%d)", arg2, arg3);
+ return;
+ } else {
+ // lets bet on the ascii code
+ e.kbd.keycode = Common::KEYCODE_INVALID;
+ }
+ } else {
+ e.kbd.keycode = jkeymap[arg2];
}
if (arg5 > 0)
e.synthetic = true;
- e.kbd.keycode = jkeymap[arg2];
e.kbd.ascii = arg3;
if (arg4 & JMETA_SHIFT)