From 11d38fc23baece1f39740d03bff3413f781687c2 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 14 Sep 2025 17:24:40 -0700 Subject: [PATCH] Only use a transparent cursor on Windows when connected via RDP VMware relies on the cursor being set to NULL to optimize relative mouse motion for games. We should also revisit whether current RDP works better with a NULL cursor or a transparent cursor. Fixes https://github.com/libsdl-org/SDL/issues/13700 (cherry picked from commit dac6af4ba6815fd88364820c48f55c878575d5bf) --- src/video/windows/SDL_windowsmouse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c index 3d6bcc4297..f88a4ee0fc 100644 --- a/src/video/windows/SDL_windowsmouse.c +++ b/src/video/windows/SDL_windowsmouse.c @@ -443,7 +443,10 @@ error: static bool WIN_ShowCursor(SDL_Cursor *cursor) { if (!cursor) { - cursor = SDL_blank_cursor; + if (GetSystemMetrics(SM_REMOTESESSION)) { + // Use a blank cursor so we continue to get relative motion over RDP + cursor = SDL_blank_cursor; + } } if (cursor) { if (cursor->internal->surface) {