Skip to content

Commit

Permalink
Reverted changes 6acdea394736 and 1448a2ac30fe
Browse files Browse the repository at this point in the history
I don't want to introduce any regressions with Android TV remote support
  • Loading branch information
slouken committed Oct 20, 2017
1 parent 2001898 commit c339d9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions android-project/src/org/libsdl/app/SDLControllerManager.java
Expand Up @@ -92,16 +92,15 @@ public static boolean isDeviceSDLJoystick(int deviceId) {
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) {
Log.v(TAG, "Input device " + device.getName() + " is a joystick.");
}
/* A lot of things are a DPAD that we don't want to use as a joystick (e.g. gpio input, etc.)
if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) {
Log.v(TAG, "Input device " + device.getName() + " is a dpad.");
}
*/
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
}

return (((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) ||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
);
}
Expand Down

0 comments on commit c339d9e

Please sign in to comment.