From e29011ecde7add65d8269211e33167befcaae294 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 7 Feb 2023 13:47:39 -0500 Subject: [PATCH] - (win32) increase compatibility with indirect renders/inputs - instruct the operating system that the cursor is actually hidden - for some API's this actually gives a hint that the cursor is grabbed, which allows for relative mouse movement. In particular, Parallels and Microsft RDP need this. --- src/common/platform/win32/i_mouse.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/platform/win32/i_mouse.cpp b/src/common/platform/win32/i_mouse.cpp index f9fb1b8ab..908452916 100644 --- a/src/common/platform/win32/i_mouse.cpp +++ b/src/common/platform/win32/i_mouse.cpp @@ -196,10 +196,12 @@ static void SetCursorState(bool visible) { if (CursorState) { + ShowCursor(1); SetCursor((HCURSOR)(intptr_t)GetClassLongPtr(mainwindow.GetHandle(), GCLP_HCURSOR)); } else { + ShowCursor(0); SetCursor(NULL); } }