mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-06-17 06:10:58 +00:00
Optimize button mapping for 8BitDo controllers (#826)
* Optimize button mapping for 8BitDo controllers #825
This commit is contained in:
@@ -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) {
|
if (context.usesLinuxGamepadStandardFaceButtons) {
|
||||||
// Android's Generic.kl swaps BTN_NORTH and BTN_WEST
|
// Android's Generic.kl swaps BTN_NORTH and BTN_WEST
|
||||||
switch (event.getScanCode()) {
|
switch (event.getScanCode()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user