Module: wine Branch: master Commit: d9570c3935f66d91583b75fb5865707c066ef6fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9570c3935f66d91583b75fb58...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Feb 10 10:37:56 2014 +0100
dxgi: Return DXGI_ERROR_INVALID_CALL when given a NULL mode_count in dxgi_output_GetDisplayModeList().
---
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;