Fixed Android joystick detection
This commit is contained in:
parent
6656b81b42
commit
a96285279b
1 changed files with 3 additions and 1 deletions
|
@ -101,7 +101,9 @@ public class SDLControllerManager
|
||||||
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((sources & (InputDevice.SOURCE_CLASS_JOYSTICK|InputDevice.SOURCE_GAMEPAD)) != 0);
|
return (((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) ||
|
||||||
|
((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue