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:
Cameron Gutman
2022-07-31 17:12:52 -05:00
parent b9280e9a8e
commit a80d30baf7

View File

@@ -520,9 +520,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
context.vendorId = dev.getVendorId();
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())) {
@@ -572,16 +569,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
context.leftTriggerAxis = MotionEvent.AXIS_BRAKE;
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
{
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) {
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
// 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 isNonStandardDualShock4;
public boolean is8BitdoSn30Xcloud;
public boolean usesLinuxGamepadStandardFaceButtons;
public boolean isNonStandardXboxBtController;
public boolean isServal;