Brendan Shanks : user32: Improve QueryDisplayConfig() stub.

Alexandre Julliard julliard at winehq.org
Tue May 5 14:48:52 CDT 2020


Module: wine
Branch: master
Commit: 4e795a8d8130e0e7156f6ba8f1e33bac374ea851
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4e795a8d8130e0e7156f6ba8f1e33bac374ea851

Author: Brendan Shanks <bshanks at codeweavers.com>
Date:   Mon May  4 18:08:30 2020 -0700

user32: Improve QueryDisplayConfig() stub.

Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/sysparams.c     | 12 +++++++++++-
 dlls/user32/tests/monitor.c |  3 ---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index c43720eca8..74158f6aae 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -4509,7 +4509,17 @@ LONG WINAPI QueryDisplayConfig(UINT32 flags, UINT32 *numpathelements, DISPLAYCON
                                DISPLAYCONFIG_TOPOLOGY_ID *topologyid)
 {
     FIXME("(%08x %p %p %p %p %p)\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
-    return ERROR_CALL_NOT_IMPLEMENTED;
+
+    if (!numpathelements || !numinfoelements)
+        return ERROR_INVALID_PARAMETER;
+
+    if (!*numpathelements || !*numinfoelements)
+        return ERROR_INVALID_PARAMETER;
+
+    if (!flags)
+        return ERROR_INVALID_PARAMETER;
+
+    return ERROR_NOT_SUPPORTED;
 }
 
 /***********************************************************************
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
index 2a9c5c3984..7c034c823a 100644
--- a/dlls/user32/tests/monitor.c
+++ b/dlls/user32/tests/monitor.c
@@ -1275,8 +1275,6 @@ static void test_query_display_config(void)
     DISPLAYCONFIG_MODE_INFO mi[20];
     LONG ret;
 
-    todo_wine
-    {
     ret = pQueryDisplayConfig(QDC_ALL_PATHS, NULL, NULL, NULL, NULL, NULL);
     ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
 
@@ -1324,7 +1322,6 @@ static void test_query_display_config(void)
     ok(ret == ERROR_INSUFFICIENT_BUFFER || ret == ERROR_NOT_SUPPORTED, "got %d\n", ret);
     ok (paths == 1, "got %u\n", paths);
     ok (modes == 1, "got %u\n", modes);
-    }
 }
 
 static void test_display_config_get_device_info(void)




More information about the wine-cvs mailing list