mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 18:02:05 +00:00
ANDROID: Fix KeyEvent NullPointerException
Could happen with some special symbols from the virtual keyboard
This commit is contained in:
parent
8ab136dafb
commit
47e9db8fdf
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user