mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-20 15:30:11 +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 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
|
||||||
)) {
|
)) {
|
||||||
@@ -610,8 +610,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
|
||||||
)) {
|
)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user