Optimize button mapping for 8BitDo controllers (#826)

* Optimize button mapping for 8BitDo controllers #825
This commit is contained in:
Christoph Papke authored and GitHub committed 2020-05-05 16:04:31 -07:00
1 parent 755571ad33
commit 363145a284
1 file changed
+5
@@ -827,6 +827,11 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
}
}
// Override mode button for 8BitDo controllers
if (context.vendorId == 0x2dc8 && event.getScanCode() == 306) {
return KeyEvent.KEYCODE_BUTTON_MODE;
}
if (context.usesLinuxGamepadStandardFaceButtons) {
// Android's Generic.kl swaps BTN_NORTH and BTN_WEST
switch (event.getScanCode()) {