[PATCH 4/5] dxgi: Return DXGI_ERROR_INVALID_CALL when given a NULL mode_count in dxgi_output_GetDisplayModeList().

Henri Verbeet hverbeet at codeweavers.com
Mon Feb 10 03:37:56 CST 2014


---
 dlls/dxgi/output.c       |    4 +---
 dlls/dxgi/tests/device.c |    4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c
index 4cdd06b..ec9d01b 100644
--- a/dlls/dxgi/output.c
+++ b/dlls/dxgi/output.c
@@ -132,9 +132,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
             iface, debug_dxgi_format(format), flags, mode_count, desc);
 
     if (!mode_count)
-    {
-        return S_OK;
-    }
+        return DXGI_ERROR_INVALID_CALL;
 
     if (format == DXGI_FORMAT_UNKNOWN)
     {
diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c
index b907a23..d648dc7 100644
--- a/dlls/dxgi/tests/device.c
+++ b/dlls/dxgi/tests/device.c
@@ -279,7 +279,7 @@ static void test_output(void)
     ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#x.\n", hr);
 
     hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, NULL, NULL);
-    todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+    ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
 
     hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM, 0, &mode_count, NULL);
     ok(SUCCEEDED(hr)
@@ -309,7 +309,7 @@ static void test_output(void)
 
     hr = IDXGIOutput_GetDisplayModeList(output, DXGI_FORMAT_R8G8B8A8_UNORM,
             DXGI_ENUM_MODES_SCALING, NULL, modes);
-    todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+    ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
     ok(!modes[0].Height, "No output was expected.\n");
 
     mode_count = 0;
-- 
1.7.10.4




More information about the wine-patches mailing list