|
@@ -1496,7 +1496,13 @@ class SDLJoystickHandler_API12 extends SDLJoystickHandler {
|
|
|
if (joystick == null) {
|
|
|
joystick = new SDLJoystick();
|
|
|
InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
|
|
|
- if( (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
|
|
+
|
|
|
+ if (
|
|
|
+ (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0
|
|
|
+ ||
|
|
|
+ (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_BUTTON) != 0
|
|
|
+ )
|
|
|
+ {
|
|
|
joystick.device_id = deviceIds[i];
|
|
|
joystick.name = joystickDevice.getName();
|
|
|
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|