diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index 5c108a32..ae931630 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -582,8 +582,8 @@ public class Game extends Activity implements SurfaceHolder.Callback, boolean handled = false; boolean detectedGamepad = event.getDevice() == null ? false : - ((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) != 0 || - (event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) != 0); + ((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK || + (event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD); if (detectedGamepad || (event.getDevice() == null || event.getDevice().getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC )) { @@ -624,8 +624,8 @@ public class Game extends Activity implements SurfaceHolder.Callback, boolean handled = false; boolean detectedGamepad = event.getDevice() == null ? false : - ((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) != 0 || - (event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) != 0); + ((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK || + (event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD); if (detectedGamepad || (event.getDevice() == null || event.getDevice().getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC )) {