From c339d9ed6d70d598223d949397d8fffbf3a43366 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 20 Oct 2017 10:29:22 -0700 Subject: [PATCH] Reverted changes 6acdea394736 and 1448a2ac30fe I don't want to introduce any regressions with Android TV remote support --- android-project/src/org/libsdl/app/SDLControllerManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLControllerManager.java b/android-project/src/org/libsdl/app/SDLControllerManager.java index 0419306c2..36294422f 100644 --- a/android-project/src/org/libsdl/app/SDLControllerManager.java +++ b/android-project/src/org/libsdl/app/SDLControllerManager.java @@ -92,16 +92,15 @@ public class SDLControllerManager 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) ); }