From 1a7b7ce01e9c734578a27073c0b4d47fa02dbbf9 Mon Sep 17 00:00:00 2001 From: "A.J. Ruckman" <40143425+ajruckman@users.noreply.github.com> Date: Sun, 4 Jul 2021 17:03:02 +0000 Subject: [PATCH] [client] Fix narrowing issues with win:shrinkOnUpscale param Conversion from the float values srcW/srcH to the int values for the client window dimensions would sometimes round down, causing the client to scale instead of matching the host's resolution. --- client/src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/core.c b/client/src/core.c index d9084b7a..63e2a700 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -234,12 +234,12 @@ void core_updatePositionInfo(void) if (g_state.windowW > srcW) { force = true; - g_state.dstRect.w = srcW; + g_state.dstRect.w = (int) (srcW + 0.5); } if (g_state.windowH > srcH) { force = true; - g_state.dstRect.h = srcH; + g_state.dstRect.h = (int) (srcH + 0.5); } }