Skip to content

Commit

Permalink
Android: fix joystick allocation that can be never used
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Oct 5, 2020
1 parent 2e38c94 commit a70bb58
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -180,9 +180,9 @@ public void pollInputDevices() {
for(int i=0; i < deviceIds.length; ++i) {
SDLJoystick joystick = getJoystick(deviceIds[i]);
if (joystick == null) {
joystick = new SDLJoystick();
InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
if (SDLControllerManager.isDeviceSDLJoystick(deviceIds[i])) {
joystick = new SDLJoystick();
joystick.device_id = deviceIds[i];
joystick.name = joystickDevice.getName();
joystick.desc = getJoystickDescriptor(joystickDevice);
Expand Down

0 comments on commit a70bb58

Please sign in to comment.