You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Ensure joystick has been added or not already removed when processing input
(cherry picked from commit 806e7d18d1)
This commit is contained in:
committed by
Rémi Verschelde
parent
a00478afe9
commit
50bf882fcc
@@ -186,6 +186,9 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
|
||||
if (mJoystickIds.indexOfKey(deviceId) >= 0) {
|
||||
final int godotJoyId = mJoystickIds.get(deviceId);
|
||||
Joystick joystick = mJoysticksDevices.get(deviceId);
|
||||
if (joystick == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
final int axis = joystick.axes.get(i);
|
||||
|
||||
Reference in New Issue
Block a user