mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-04 15:06:08 +00:00
Add controller touchpad support
This commit is contained in:
@@ -1454,11 +1454,15 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
}
|
||||
|
||||
int eventSource = event.getSource();
|
||||
int deviceSources = event.getDevice() != null ? event.getDevice().getSources() : 0;
|
||||
if ((eventSource & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
if (controllerHandler.handleMotionEvent(event)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ((deviceSources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 && controllerHandler.tryHandleTouchpadEvent(event)) {
|
||||
return true;
|
||||
}
|
||||
else if ((eventSource & InputDevice.SOURCE_CLASS_POINTER) != 0 ||
|
||||
(eventSource & InputDevice.SOURCE_CLASS_POSITION) != 0 ||
|
||||
eventSource == InputDevice.SOURCE_MOUSE_RELATIVE)
|
||||
|
||||
Reference in New Issue
Block a user