mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 15:27:18 +00:00
Add options to control gamepad touchpad and motion and reorganize input settings
This commit is contained in:
1 parent
2b8a43ab13
commit
e6876926a4
5 files changed
+64
-18
No files matched your search
@@ -1477,6 +1477,11 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bail if the user wants gamepad touchpads to control the mouse
|
||||
if (prefConfig.gamepadTouchpadAsMouse) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only get a context if one already exists. We want to ensure we don't report non-gamepads.
|
||||
InputDeviceContext context = inputDeviceContexts.get(event.getDeviceId());
|
||||
if (context == null) {
|
||||
@@ -1864,6 +1869,11 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
}
|
||||
|
||||
public void handleSetMotionEventState(final short controllerNumber, final byte motionType, short reportRateHz) {
|
||||
// Don't use motion sensors if the user turned them off
|
||||
if (!prefConfig.gamepadMotionSensors) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Report rate is restricted to <= 200 Hz without the HIGH_SAMPLING_RATE_SENSORS permission
|
||||
reportRateHz = (short) Math.min(200, reportRateHz);
|
||||
|
||||
|
||||
Reference in new issue
Block a user