mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 10:31:07 +00:00
Fix Pixel C keyboard d-pad regression due to aliasing with SOURCE_GAMEPAD
This commit is contained in:
@@ -568,8 +568,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
|
||||
)) {
|
||||
@@ -610,8 +610,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
|
||||
)) {
|
||||
|
||||
Reference in New Issue
Block a user