[Scummvm-cvs-logs] scummvm master -> 47e9db8fdff9c538698450725cc0a369e6e9eab5
dhewg
dhewg at wiibrew.org
Thu Mar 17 22:09:41 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:
47e9db8fdf ANDROID: Fix KeyEvent NullPointerException
Commit: 47e9db8fdff9c538698450725cc0a369e6e9eab5
https://github.com/scummvm/scummvm/commit/47e9db8fdff9c538698450725cc0a369e6e9eab5
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-17T14:02:17-07:00
Commit Message:
ANDROID: Fix KeyEvent NullPointerException
Could happen with some special symbols from the virtual keyboard
Changed paths:
backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java
index 7507d7e..da589a3 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java
@@ -119,9 +119,13 @@ public class ScummVMEvents implements
// sequence of characters
if (action == KeyEvent.ACTION_MULTIPLE &&
keyCode == KeyEvent.KEYCODE_UNKNOWN) {
- KeyCharacterMap m = KeyCharacterMap.load(e.getDeviceId());
+ final KeyCharacterMap m = KeyCharacterMap.load(e.getDeviceId());
+ final KeyEvent[] es = m.getEvents(e.getCharacters().toCharArray());
- for (KeyEvent s : m.getEvents(e.getCharacters().toCharArray())) {
+ if (es == null)
+ return true;
+
+ for (KeyEvent s : es) {
_scummvm.pushEvent(JE_KEY, s.getAction(), s.getKeyCode(),
s.getUnicodeChar() & KeyCharacterMap.COMBINING_ACCENT_MASK,
s.getMetaState(), s.getRepeatCount());
More information about the Scummvm-git-logs
mailing list