mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-28 14:47:13 +01:00
Ported: Ensure joystick has been added or not already removed when processing input.
50bf882fcc
This commit is contained in:
parent
6225d5e6b5
commit
1e747ac9ba
@ -186,6 +186,10 @@ public class PandemoniumInputHandler implements InputDeviceListener {
|
||||
final int pandemoniumJoyId = 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);
|
||||
final float value = event.getAxisValue(axis);
|
||||
|
Loading…
Reference in New Issue
Block a user