浏览代码

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.
Steven Noonan 3 年之前
父节点
当前提交
9ce9c2530a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/windows/SDL_windowsmodes.c

+ 1 - 0
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;