mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 23:36:53 +00:00
Make sure the joystick actually has relevant axes to avoid FPing on some weird keyboards
This commit is contained in:
1 parent
a170e1efd7
commit
8bac873e67
1 file changed
+3
-1
@@ -161,7 +161,9 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((dev.getSources() & InputDevice.SOURCE_JOYSTICK) != 0) {
|
||||
if ((dev.getSources() & InputDevice.SOURCE_JOYSTICK) != 0 &&
|
||||
getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_X) != null &&
|
||||
getMotionRangeForJoystickAxis(dev, MotionEvent.AXIS_Y) != null) {
|
||||
LimeLog.info("Counting InputDevice: "+dev.getName());
|
||||
mask |= 1 << count++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user