diff options
Diffstat (limited to 'backends/platform/android/org')
-rw-r--r-- | backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVMEvents.java index 7507d7e5fc..da589a326e 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()); |