From fb9cf6cfbc4146e35014ead6ae6c2db5f75ae576 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 8 Jan 2021 01:01:53 +1100 Subject: [PATCH] [client] spice: apply sensitivity when in raw capture mode --- client/src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/src/main.c b/client/src/main.c index c88c5596..425ab242 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -831,6 +831,16 @@ static bool isValidCursorLocation(int x, int y) static void handleMouseRawEvent(int ex, int ey) { + if (g_cursor.sens != 0) + { + g_cursor.sensX += ((float)ex / 10.0f) * (g_cursor.sens + 10); + g_cursor.sensY += ((float)ey / 10.0f) * (g_cursor.sens + 10); + ex = floor(g_cursor.sensX); + ey = floor(g_cursor.sensY); + g_cursor.sensX -= ex; + g_cursor.sensY -= ey; + } + if (!spice_mouse_motion(ex, ey)) DEBUG_ERROR("failed to send mouse motion message"); }