mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Properly handle Xbox One S controllers with updated firmware
This commit is contained in:
parent
8e7b144339
commit
0432d5725b
@ -404,9 +404,19 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
context.isServal = true;
|
context.isServal = true;
|
||||||
context.ignoreBack = 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")) {
|
else if (devName.equals("Xbox Wireless Controller")) {
|
||||||
context.isXboxBtController = true;
|
if (gasRange == null) {
|
||||||
|
context.isXboxBtController = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
context.ignoreBack = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user