Permalink
Browse files

Android: Remove controller-specific code that isn't needed anymore

  • Loading branch information...
JosJuice committed Jul 11, 2018
1 parent d32c297 commit 78cb1c29141cd6925a08f3ff88885312c83b7a87
@@ -39,19 +39,6 @@ else if (isXboxOneWireless(inputDevice))
{
return (value + 1) / 2.0f;
}
if (axis == MotionEvent.AXIS_GENERIC_1)
{
// This axis is stuck at ~.5. Ignore it.
return 0.0f;
}
}
else if (isMogaPro2Hid(inputDevice))
{
// This controller has a broken axis that reports a constant value. Ignore it.
if (axis == MotionEvent.AXIS_GENERIC_1)
{
return 0.0f;
}
}
return value;
}
@@ -67,10 +54,4 @@ private boolean isXboxOneWireless(InputDevice inputDevice)
// Microsoft Xbox One controller
return inputDevice.getVendorId() == 0x45e && inputDevice.getProductId() == 0x2e0;
}
private boolean isMogaPro2Hid(InputDevice inputDevice)
{
// Moga Pro 2 HID
return inputDevice.getVendorId() == 0x20d6 && inputDevice.getProductId() == 0x6271;
}
}

0 comments on commit 78cb1c2

Please sign in to comment.