mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 10:31:07 +00:00
Cancel the mouse emulation timer when the stream ends
This commit is contained in:
@@ -162,11 +162,25 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
for (int i = 0; i < inputDeviceContexts.size(); i++) {
|
||||
InputDeviceContext deviceContext = inputDeviceContexts.valueAt(i);
|
||||
|
||||
if (deviceContext.mouseEmulationTimer != null) {
|
||||
deviceContext.mouseEmulationTimer.cancel();
|
||||
deviceContext.mouseEmulationTimer = null;
|
||||
}
|
||||
|
||||
if (deviceContext.vibrator != null) {
|
||||
deviceContext.vibrator.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < usbDeviceContexts.size(); i++) {
|
||||
UsbDeviceContext deviceContext = usbDeviceContexts.valueAt(i);
|
||||
|
||||
if (deviceContext.mouseEmulationTimer != null) {
|
||||
deviceContext.mouseEmulationTimer.cancel();
|
||||
deviceContext.mouseEmulationTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
deviceVibrator.cancel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user