Преглед изворни кода

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
Sam Lantinga пре 21 часа
родитељ
комит
dac6af4ba6
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      src/video/windows/SDL_windowsmouse.c

+ 4 - 1
src/video/windows/SDL_windowsmouse.c

@@ -434,7 +434,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) {