Fix 3rd party Xbox controller d-pads

This commit is contained in:
Cameron Gutman 2016-10-21 12:38:55 -07:00
parent 6de4288a85
commit 21ea3d8a2b

View File

@ -642,7 +642,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
}
else if (context.hatXAxis == -1 &&
context.hatYAxis == -1 &&
/* FIXME: There's no good way to know for sure if xpad is bound
to this device, so we won't use the name to validate if these
scancodes should be mapped to DPAD
context.isXboxController &&
*/
event.getKeyCode() == KeyEvent.KEYCODE_UNKNOWN) {
// If there's not a proper Xbox controller mapping, we'll translate the raw d-pad
// scan codes into proper key codes