Skip to content

Commit dac6af4

Browse files
committed
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 #13700
1 parent cc3274b commit dac6af4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/video/windows/SDL_windowsmouse.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,10 @@ static HCURSOR GetCachedCursor(SDL_Cursor *cursor)
434434
static bool WIN_ShowCursor(SDL_Cursor *cursor)
435435
{
436436
if (!cursor) {
437-
cursor = SDL_blank_cursor;
437+
if (GetSystemMetrics(SM_REMOTESESSION)) {
438+
// Use a blank cursor so we continue to get relative motion over RDP
439+
cursor = SDL_blank_cursor;
440+
}
438441
}
439442
if (cursor) {
440443
if (cursor->internal->surface) {

0 commit comments

Comments
 (0)