Commit d9570c39 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

dxgi: Return DXGI_ERROR_INVALID_CALL when given a NULL mode_count in…

dxgi: Return DXGI_ERROR_INVALID_CALL when given a NULL mode_count in dxgi_output_GetDisplayModeList().
parent 4d7bd4ce
......@@ -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)
{
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment