summaryrefslogtreecommitdiff
path: root/platform/android/java/lib/src/org
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2019-09-22 15:05:11 +0100
committerlawnjelly <lawnjelly@gmail.com>2019-09-23 18:08:41 +0100
commitad5d0cca4dd468bd07406be08d31ee98e6477e85 (patch)
tree1b24400d51387a3d3fa3da16af30b062a703b317 /platform/android/java/lib/src/org
parent2add51d0823fe2ef7cb439a6f3fae17e8dd4717f (diff)
Fix Android keyboard crash with left cursor
Fixes #32168. Previously we were returning all key up and key down messages as unhandled to the OS. This was resulting in crashes on certain keypresses (left cursor), for undetermined reason. This PR defaults all key up and keydown messages to be returned as handled by Godot, except those explicitly coded as exceptions (currently volume keys only).
Diffstat (limited to 'platform/android/java/lib/src/org')
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
index a443a0ad90..2beca67922 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
+++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java
@@ -96,7 +96,6 @@ public class GodotInputHandler implements InputDeviceListener {
GodotLib.joybutton(device_id, button, false);
}
});
- return true;
}
} else {
final int chr = event.getUnicodeChar(0);
@@ -108,7 +107,7 @@ public class GodotInputHandler implements InputDeviceListener {
});
};
- return false;
+ return true;
}
public boolean onKeyDown(final int keyCode, KeyEvent event) {
@@ -142,7 +141,6 @@ public class GodotInputHandler implements InputDeviceListener {
GodotLib.joybutton(device_id, button, true);
}
});
- return true;
}
} else {
final int chr = event.getUnicodeChar(0);
@@ -154,7 +152,7 @@ public class GodotInputHandler implements InputDeviceListener {
});
};
- return false;
+ return true;
}
public boolean onGenericMotionEvent(MotionEvent event) {