mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-23 08:46:40 +00:00
Revert "Add support for 8bitdo sn30 pro xCloud (#1102)"
The broken mapping is due to an old firmware (see #978).
This reverts commit bfc3116661.
This commit is contained in:
@@ -520,9 +520,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
context.vendorId = dev.getVendorId();
|
context.vendorId = dev.getVendorId();
|
||||||
context.productId = dev.getProductId();
|
context.productId = dev.getProductId();
|
||||||
if (context.vendorId == 0x2dc8 && context.productId == 0x2100) {
|
|
||||||
context.is8BitdoSn30Xcloud = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasDualAmplitudeControlledRumbleVibrators(dev.getVibratorManager())) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && hasDualAmplitudeControlledRumbleVibrators(dev.getVibratorManager())) {
|
||||||
@@ -572,16 +569,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
context.leftTriggerAxis = MotionEvent.AXIS_BRAKE;
|
context.leftTriggerAxis = MotionEvent.AXIS_BRAKE;
|
||||||
context.rightTriggerAxis = MotionEvent.AXIS_THROTTLE;
|
context.rightTriggerAxis = MotionEvent.AXIS_THROTTLE;
|
||||||
}
|
}
|
||||||
else if (context.is8BitdoSn30Xcloud)
|
|
||||||
{
|
|
||||||
// Specific configs for 8BitDo SN30 Pro for Xbox
|
|
||||||
context.leftTriggerAxis = MotionEvent.AXIS_RX;
|
|
||||||
context.rightTriggerAxis = MotionEvent.AXIS_RY;
|
|
||||||
context.triggersIdleNegative = false;
|
|
||||||
context.triggerDeadzone = 0.30f;
|
|
||||||
context.hasSelect = true;
|
|
||||||
context.hasMode = true;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InputDevice.MotionRange rxRange = getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_RX);
|
InputDevice.MotionRange rxRange = getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_RX);
|
||||||
@@ -942,14 +929,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
if (context.vendorId == 0x2dc8 && event.getScanCode() == 306) {
|
if (context.vendorId == 0x2dc8 && event.getScanCode() == 306) {
|
||||||
return KeyEvent.KEYCODE_BUTTON_MODE;
|
return KeyEvent.KEYCODE_BUTTON_MODE;
|
||||||
}
|
}
|
||||||
// Override select button for 8BitDo SN30 Pro for Xbox
|
|
||||||
if (context.is8BitdoSn30Xcloud) {
|
|
||||||
switch(event.getScanCode()) {
|
|
||||||
case 312:
|
|
||||||
return KeyEvent.KEYCODE_BUTTON_SELECT;
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// This mapping was adding in Android 10, then changed based on
|
// This mapping was adding in Android 10, then changed based on
|
||||||
// kernel changes (adding hid-nintendo) in Android 11. If we're
|
// kernel changes (adding hid-nintendo) in Android 11. If we're
|
||||||
@@ -1981,7 +1960,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
public boolean hatXAxisUsed, hatYAxisUsed;
|
public boolean hatXAxisUsed, hatYAxisUsed;
|
||||||
|
|
||||||
public boolean isNonStandardDualShock4;
|
public boolean isNonStandardDualShock4;
|
||||||
public boolean is8BitdoSn30Xcloud;
|
|
||||||
public boolean usesLinuxGamepadStandardFaceButtons;
|
public boolean usesLinuxGamepadStandardFaceButtons;
|
||||||
public boolean isNonStandardXboxBtController;
|
public boolean isNonStandardXboxBtController;
|
||||||
public boolean isServal;
|
public boolean isServal;
|
||||||
|
|||||||
Reference in New Issue
Block a user