From 5bd0afd6549f2055bdb98b5e964925f46ae60a0c Mon Sep 17 00:00:00 2001 From: Virt <41426325+VirtCode@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:34:50 +0200 Subject: [PATCH] fix: disappearing sw cursors on scaled monitors fixes #21 --- src/cursor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cursor.cpp b/src/cursor.cpp index 633c214..d66013e 100644 --- a/src/cursor.cpp +++ b/src/cursor.cpp @@ -84,13 +84,16 @@ void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP pMo if (!texture) return; - box.scale(pMonitor->scale); box.w *= zoom; box.h *= zoom; if (box.intersection(CBox{{}, {pMonitor->vecSize}}).empty()) return; + box.scale(pMonitor->scale); + box.x = std::round(box.x); + box.y = std::round(box.y); + // we rotate the cursor by our calculated amount box.rot = resultShown.rotation;