Optimize button mapping for 8BitDo controllers (#826)

* Optimize button mapping for 8BitDo controllers #825
This commit is contained in:
Christoph Papke
2020-05-06 01:04:31 +02:00
committed by GitHub
parent 755571ad33
commit 363145a284

View File

@@ -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()) {