From 26a4fc75a5d709c64468cd7892852a68c71adb7f Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 13 Jun 2016 21:28:54 -0500 Subject: [PATCH] Add handling for the ADT-1 controller --- .../limelight/binding/input/ControllerHandler.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/java/com/limelight/binding/input/ControllerHandler.java b/app/src/main/java/com/limelight/binding/input/ControllerHandler.java index 6fe0b003..5ae7d1b2 100644 --- a/app/src/main/java/com/limelight/binding/input/ControllerHandler.java +++ b/app/src/main/java/com/limelight/binding/input/ControllerHandler.java @@ -342,6 +342,17 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD } } + // The ADT-1 controller needs a similar fixup to the ASUS Gamepad + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { + // The device name provided is just "Gamepad" which is pretty useless, so we + // use VID/PID instead + if (dev.getVendorId() == 0x18d1 && dev.getProductId() == 0x2c40) { + context.backIsStart = true; + context.modeIsSelect = true; + context.triggerDeadzone = 0.30f; + } + } + if (devName != null) { // For the Nexus Player (and probably other ATV devices), we should // use the back button as start since it doesn't have a start/menu button