Remove automatic disabling of back button due to false-positives

This commit is contained in:
Cameron Gutman 2017-01-02 19:02:30 -08:00
parent 3ca681f050
commit fa52e5edc2

View File

@ -339,18 +339,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
}
}
// Ignore the back buttonn if a controller has both buttons
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
boolean[] hasSelectKey = dev.hasKeys(KeyEvent.KEYCODE_BUTTON_SELECT, KeyEvent.KEYCODE_BACK, 0);
if (hasSelectKey[0] && hasSelectKey[1]) {
// Xiaomi gamepads claim to have both buttons then only send KEYCODE_BACK events
if (dev.getVendorId() != 0x2717) {
LimeLog.info("Ignoring back button because select is present");
context.ignoreBack = true;
}
}
}
// The ADT-1 controller needs a similar fixup to the ASUS Gamepad
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
// The device name provided is just "Gamepad" which is pretty useless, so we
@ -414,9 +402,6 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
if (gasRange == null) {
context.isXboxBtController = true;
}
else {
context.ignoreBack = false;
}
}
}