mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Fix Pixel C keyboard d-pad regression due to aliasing with SOURCE_GAMEPAD
This commit is contained in:
parent
aa1b283570
commit
a413185085
@ -582,8 +582,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
boolean handled = false;
|
boolean handled = false;
|
||||||
|
|
||||||
boolean detectedGamepad = event.getDevice() == null ? false :
|
boolean detectedGamepad = event.getDevice() == null ? false :
|
||||||
((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) != 0 ||
|
((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK ||
|
||||||
(event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) != 0);
|
(event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD);
|
||||||
if (detectedGamepad || (event.getDevice() == null ||
|
if (detectedGamepad || (event.getDevice() == null ||
|
||||||
event.getDevice().getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC
|
event.getDevice().getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC
|
||||||
)) {
|
)) {
|
||||||
@ -624,8 +624,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
|
|
||||||
boolean handled = false;
|
boolean handled = false;
|
||||||
boolean detectedGamepad = event.getDevice() == null ? false :
|
boolean detectedGamepad = event.getDevice() == null ? false :
|
||||||
((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) != 0 ||
|
((event.getDevice().getSources() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK ||
|
||||||
(event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) != 0);
|
(event.getDevice().getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD);
|
||||||
if (detectedGamepad || (event.getDevice() == null ||
|
if (detectedGamepad || (event.getDevice() == null ||
|
||||||
event.getDevice().getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC
|
event.getDevice().getKeyboardType() != InputDevice.KEYBOARD_TYPE_ALPHABETIC
|
||||||
)) {
|
)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user