mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against a4930f003f45ab82c4c05746cbd29cbd4af09735.
This commit is contained in:
parent
b31a964e1e
commit
4ae0f97bc7
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "4e55dfb7c5e26d45794406a4ce8e50a6bc725b74"
|
||||
echo "a4930f003f45ab82c4c05746cbd29cbd4af09735"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,43 +1,33 @@
|
||||
From 72e9a5081e40600b857d357c8111e344e68aa22f Mon Sep 17 00:00:00 2001
|
||||
From 9229c4fe3078946d7f5fd976b4e2c9f0a5a8ccb1 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 10 Jan 2020 15:34:45 -0600
|
||||
Subject: [PATCH] user32: Implement QueryDisplayConfig
|
||||
|
||||
---
|
||||
dlls/user32/sysparams.c | 89 ++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 74 insertions(+), 15 deletions(-)
|
||||
dlls/user32/sysparams.c | 95 +++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 77 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
|
||||
index a29d17d72ce..84aed3dedb4 100644
|
||||
index 7ebe8099419..6d673c68e8c 100644
|
||||
--- a/dlls/user32/sysparams.c
|
||||
+++ b/dlls/user32/sysparams.c
|
||||
@@ -4757,26 +4757,85 @@ LONG WINAPI QueryDisplayConfig(UINT32 flags, UINT32 *numpathelements, DISPLAYCON
|
||||
@@ -1184,26 +1184,85 @@ LONG WINAPI QueryDisplayConfig(UINT32 flags, UINT32 *numpathelements, DISPLAYCON
|
||||
LUID gpu_luid;
|
||||
WCHAR device_name[CCHDEVICENAME];
|
||||
DEVMODEW devmode;
|
||||
+ POINT origin;
|
||||
+ HMONITOR monitor;
|
||||
+ MONITORINFOEXW monitor_info;
|
||||
+ DISPLAYCONFIG_SOURCE_MODE *source_mode = &modeinfo[0].DUMMYUNIONNAME.sourceMode;
|
||||
+ DISPLAYCONFIG_TARGET_MODE *target_mode = &modeinfo[1].DUMMYUNIONNAME.targetMode;
|
||||
+ DISPLAYCONFIG_SOURCE_MODE *source_mode = &modeinfo[0].sourceMode;
|
||||
+ DISPLAYCONFIG_TARGET_MODE *target_mode = &modeinfo[1].targetMode;
|
||||
+ DISPLAYCONFIG_PATH_SOURCE_INFO *source_info = &pathinfo[0].sourceInfo;
|
||||
+ DISPLAYCONFIG_PATH_TARGET_INFO *target_info = &pathinfo[0].targetInfo;
|
||||
|
||||
- FIXME("(%08x %p %p %p %p %p): semi-stub\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
|
||||
+
|
||||
+ TRACE("(%08x %p %p %p %p %p)\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
|
||||
|
||||
- if (!numpathelements || !numinfoelements)
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
+
|
||||
+ if (*numpathelements < 1 || *numinfoelements < 2)
|
||||
+ return ERROR_INSUFFICIENT_BUFFER;
|
||||
|
||||
- if (!*numpathelements || !*numinfoelements)
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
-
|
||||
- if (flags != QDC_ALL_PATHS &&
|
||||
- flags != QDC_ONLY_ACTIVE_PATHS &&
|
||||
- flags != QDC_DATABASE_CURRENT)
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
+
|
||||
+ origin.x = 0;
|
||||
+ origin.y = 0;
|
||||
+ monitor = MonitorFromPoint(origin, MONITOR_DEFAULTTOPRIMARY);
|
||||
@ -51,6 +41,19 @@ index a29d17d72ce..84aed3dedb4 100644
|
||||
+ return ERROR_GEN_FAILURE;
|
||||
+ }
|
||||
|
||||
- FIXME("(%08x %p %p %p %p %p): semi-stub\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
|
||||
-
|
||||
- if (!numpathelements || !numinfoelements)
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
-
|
||||
- if (!*numpathelements || !*numinfoelements)
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
-
|
||||
- if (flags != QDC_ALL_PATHS &&
|
||||
- flags != QDC_ONLY_ACTIVE_PATHS &&
|
||||
- flags != QDC_DATABASE_CURRENT)
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
-
|
||||
- if (((flags == QDC_DATABASE_CURRENT) && !topologyid) ||
|
||||
- ((flags != QDC_DATABASE_CURRENT) && topologyid))
|
||||
- return ERROR_INVALID_PARAMETER;
|
||||
@ -72,7 +75,7 @@ index a29d17d72ce..84aed3dedb4 100644
|
||||
+ target_mode->targetVideoSignalInfo.activeSize.cy = devmode.dmPelsHeight;
|
||||
+ target_mode->targetVideoSignalInfo.totalSize.cx = devmode.dmPelsWidth;
|
||||
+ target_mode->targetVideoSignalInfo.totalSize.cy = devmode.dmPelsHeight;
|
||||
+ target_mode->targetVideoSignalInfo.DUMMYUNIONNAME.videoStandard = D3DKMDT_VSS_NTSC_M;
|
||||
+ target_mode->targetVideoSignalInfo.videoStandard = D3DKMDT_VSS_NTSC_M;
|
||||
+ target_mode->targetVideoSignalInfo.scanLineOrdering = DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED;
|
||||
+
|
||||
+ modeinfo[0].infoType = DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE;
|
||||
@ -84,13 +87,13 @@ index a29d17d72ce..84aed3dedb4 100644
|
||||
+
|
||||
+ source_info->adapterId = gpu_luid;
|
||||
+ source_info->id = 0;
|
||||
+ source_info->DUMMYUNIONNAME.modeInfoIdx = 0;
|
||||
+ source_info->modeInfoIdx = 0;
|
||||
+ source_info->statusFlags = DISPLAYCONFIG_SOURCE_IN_USE;
|
||||
+
|
||||
+ target_info->adapterId = gpu_luid;
|
||||
+ target_info->id = 0;
|
||||
+
|
||||
+ target_info->DUMMYUNIONNAME.modeInfoIdx = 1;
|
||||
+ target_info->modeInfoIdx = 1;
|
||||
+ target_info->outputTechnology = DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI;
|
||||
+ target_info->rotation = DISPLAYCONFIG_ROTATION_IDENTITY;
|
||||
+ target_info->scaling = DISPLAYCONFIG_SCALING_IDENTITY;
|
||||
@ -113,5 +116,5 @@ index a29d17d72ce..84aed3dedb4 100644
|
||||
if (topologyid)
|
||||
{
|
||||
--
|
||||
2.27.0
|
||||
2.35.1
|
||||
|
||||
|
@ -1 +1 @@
|
||||
4e55dfb7c5e26d45794406a4ce8e50a6bc725b74
|
||||
a4930f003f45ab82c4c05746cbd29cbd4af09735
|
||||
|
Loading…
Reference in New Issue
Block a user