From 0432d5725bd50fed582baa051d2e07e778045799 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 11 Nov 2016 14:03:20 -0800 Subject: [PATCH] Properly handle Xbox One S controllers with updated firmware --- .../limelight/binding/input/ControllerHandler.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 d12fddbc..179e9c58 100644 --- a/app/src/main/java/com/limelight/binding/input/ControllerHandler.java +++ b/app/src/main/java/com/limelight/binding/input/ControllerHandler.java @@ -404,9 +404,19 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD context.isServal = true; context.ignoreBack = true; } - // The Xbox One S Bluetooth controller has some mappings that need fixing up + // The Xbox One S Bluetooth controller has some mappings that need fixing up. + // However, Microsoft released a firmware update with no change to VID/PID + // or device name that fixed the mappings for Android. Since there's + // no good way to detect this, we'll use the presence of GAS/BRAKE axes + // that were added in the latest firmware. If those are present, the only + // required fixup is ignoring the select button. else if (devName.equals("Xbox Wireless Controller")) { - context.isXboxBtController = true; + if (gasRange == null) { + context.isXboxBtController = true; + } + else { + context.ignoreBack = false; + } } }