From 9ce9c2530ae79f93f0db18066182dbee71207a09 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Thu, 25 Aug 2022 18:41:32 -0700 Subject: [PATCH] SDL_windowsmodes: fix WIN_GetDisplayNameVista source identifier number This was getting the wrong monitor's name because the source identifier was not being included in the DisplayConfigGetDeviceInfo request. --- src/video/windows/SDL_windowsmodes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/windows/SDL_windowsmodes.c b/src/video/windows/SDL_windowsmodes.c index 1bba3ecd43..2e44140147 100644 --- a/src/video/windows/SDL_windowsmodes.c +++ b/src/video/windows/SDL_windowsmodes.c @@ -256,6 +256,7 @@ WIN_GetDisplayNameVista(const WCHAR *deviceName) sourceName.header.adapterId = paths[i].targetInfo.adapterId; sourceName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME; sourceName.header.size = sizeof (sourceName); + sourceName.header.id = paths[i].sourceInfo.id; rc = pDisplayConfigGetDeviceInfo(&sourceName.header); if (rc != ERROR_SUCCESS) { break;