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

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2019-06-25 02:29:47 +04:30 committed by Alexandre Julliard
parent 9b668792a9
commit 8113aca762
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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. */