New moonlight patch for mouse-accel

This commit is contained in:
Vili Sinervä 2024-12-03 22:10:42 +02:00
parent 3638f38ca3
commit 8c08623c0a
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
2 changed files with 23 additions and 0 deletions

15
misc/mouse-accel.patch Normal file
View file

@ -0,0 +1,15 @@
diff --git a/app/streaming/input/input.cpp b/app/streaming/input/input.cpp
index 95db06e0..d1d34fd5 100644
--- a/app/streaming/input/input.cpp
+++ b/app/streaming/input/input.cpp
@@ -39,6 +39,10 @@ SdlInputHandler::SdlInputHandler(StreamingPreferences& prefs, int streamWidth, i
m_CaptureSystemKeysMode = StreamingPreferences::CSK_ALWAYS;
}
+ // This is used to always grab the OS-modified input for the mouse
+ // This is because I am using OS-level functionality for mouse acceleration
+ SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1");
+
// Allow gamepad input when the app doesn't have focus if requested
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, prefs.backgroundGamepad ? "1" : "0");