mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-24 21:42:44 +00:00
Avoid touchscreens when looking for pointer capture capable devices
This commit is contained in:
parent
eb9e6443e2
commit
8a63b61495
@ -39,6 +39,15 @@ public class AndroidNativePointerCaptureProvider extends AndroidPointerIconCaptu
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip touchscreens when considering compatible capture devices.
|
||||
// Samsung devices on Android 12 will report a sec_touchpad device
|
||||
// with SOURCE_TOUCHSCREEN, SOURCE_KEYBOARD, and SOURCE_MOUSE.
|
||||
// Upon enabling pointer capture, that device will switch to
|
||||
// SOURCE_KEYBOARD and SOURCE_TOUCHPAD.
|
||||
if (device.supportsSource(InputDevice.SOURCE_TOUCHSCREEN)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (device.supportsSource(InputDevice.SOURCE_MOUSE) ||
|
||||
device.supportsSource(InputDevice.SOURCE_MOUSE_RELATIVE) ||
|
||||
device.supportsSource(InputDevice.SOURCE_TOUCHPAD)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user