From e0c9a71cd8f5128a0cb30a2586037c7bcf887d4b Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 17 Jul 2021 02:19:52 -0400 Subject: [PATCH] [client] spice: remove dpi which is no longer used DPI was originally added to workaround cursor movement scaling, but since due to changes with mouse handling, it's no longer required. --- client/src/core.c | 4 +--- client/src/main.c | 1 - client/src/main.h | 6 ------ 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/client/src/core.c b/client/src/core.c index 63e2a700..1ccff931 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -260,12 +260,10 @@ void core_updatePositionInfo(void) g_cursor.useScale = ( srcH != g_state.dstRect.h || - srcW != g_state.dstRect.w || - g_cursor.guest.dpiScale != 100); + srcW != g_state.dstRect.w); g_cursor.scale.x = (float)srcW / (float)g_state.dstRect.w; g_cursor.scale.y = (float)srcH / (float)g_state.dstRect.h; - g_cursor.dpiScale = g_cursor.guest.dpiScale / 100.0f; if (!g_state.posInfoValid) { diff --git a/client/src/main.c b/client/src/main.c index 0cbc51e2..4385f287 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -536,7 +536,6 @@ int main_frameThread(void * unused) if (g_params.autoResize) g_state.ds->setWindowSize(lgrFormat.width, lgrFormat.height); - g_cursor.guest.dpiScale = frame->mouseScalePercent; core_updatePositionInfo(); } diff --git a/client/src/main.h b/client/src/main.h index 0cc8153c..816ddc41 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -202,9 +202,6 @@ struct CursorInfo /* true if the details in this struct are valid */ bool valid; - - /* the DPI scaling of the guest */ - uint32_t dpiScale; }; struct CursorState @@ -233,9 +230,6 @@ struct CursorState /* the amount to scale the X & Y movements by */ struct DoublePoint scale; - /* the dpi scale factor from the guest as a fraction */ - double dpiScale; - /* the error accumulator */ struct DoublePoint acc;