dxgi/tests: Test the fullscreen state after the swapchain window is destroyed.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
22e76d0397
commit
a7984a3a9a
|
@ -2363,6 +2363,7 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
|
|||
IDXGISwapChain *swapchain;
|
||||
IDXGIFactory *factory;
|
||||
IDXGIOutput *output;
|
||||
BOOL fullscreen;
|
||||
ULONG refcount;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -2432,11 +2433,20 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
|
|||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
DestroyWindow(swapchain_desc.OutputWindow);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
|
||||
ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
refcount = IDXGISwapChain_Release(swapchain);
|
||||
|
@ -2448,13 +2458,25 @@ static void test_set_fullscreen(IUnknown *device, BOOL is_d3d12)
|
|||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
DestroyWindow(swapchain_desc.OutputWindow);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, TRUE, NULL);
|
||||
ok(hr == DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
ok(!fullscreen, "Got unexpected fullscreen %#x.\n", fullscreen);
|
||||
hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
refcount = IDXGISwapChain_Release(swapchain);
|
||||
|
|
Loading…
Reference in New Issue