Commit 8113aca7 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

dxgi: Return DXGI_STATUS_OCCLUDED for minimised windows in d3d11_swapchain_present().

parent 9b668792
......@@ -306,6 +306,9 @@ static HRESULT d3d11_swapchain_present(struct d3d11_swapchain *swapchain,
return DXGI_ERROR_INVALID_CALL;
}
if (IsIconic(d3d11_swapchain_get_hwnd(swapchain)))
return DXGI_STATUS_OCCLUDED;
if (flags & ~DXGI_PRESENT_TEST)
FIXME("Unimplemented flags %#x.\n", flags);
if (flags & DXGI_PRESENT_TEST)
......
......@@ -4073,8 +4073,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
/* Minimised window. */
ShowWindow(swapchain_desc.OutputWindow, SW_MINIMIZE);
hr = IDXGISwapChain_Present(swapchain, 0, flags[i]);
todo_wine_if(!is_d3d12) ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED),
"Test %u: Got unexpected hr %#x.\n", i, hr);
ok(hr == (is_d3d12 ? S_OK : DXGI_STATUS_OCCLUDED), "Test %u: Got unexpected hr %#x.\n", i, hr);
ShowWindow(swapchain_desc.OutputWindow, SW_NORMAL);
/* Hidden window. */
......
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