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 dac6af4ba6)
This commit is contained in:
Sam Lantinga
2025-09-14 17:24:40 -07:00
parent d027f0ae6e
commit 11d38fc23b

View File

@@ -443,8 +443,11 @@ error:
static bool WIN_ShowCursor(SDL_Cursor *cursor)
{
if (!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) {
SDL_cursor = GetCachedCursor(cursor);