[Scummvm-cvs-logs] scummvm master -> c77e7f75a66c5236347fc6fc907e67f053a048fb

dhewg dhewg at wiibrew.org
Sun Mar 20 13:31:21 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c77e7f75a6 ANDROID: Trust ASCII kbd codes on unknown keys


Commit: c77e7f75a66c5236347fc6fc907e67f053a048fb
    https://github.com/scummvm/scummvm/commit/c77e7f75a66c5236347fc6fc907e67f053a048fb
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-20T05:29:21-07:00

Commit Message:
ANDROID: Trust ASCII kbd codes on unknown keys

Changed paths:
    backends/platform/android/events.cpp



diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 5fc10b2..c969068 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)






More information about the Scummvm-git-logs mailing list