From: Zhiyi Zhang Subject: [PATCH 1/2] dxgi/tests: Test output after using Alt+Enter to switch fullscreen. Message-Id: <43211b9d-1343-3379-eca1-f01fb1ff6d22@codeweavers.com> Date: Mon, 8 Jul 2019 15:09:11 +0800 Signed-off-by: Zhiyi Zhang --- dlls/dxgi/tests/dxgi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index ab65725ccf..af396e9acf 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -5305,6 +5305,7 @@ static void test_window_association(void) LONG_PTR original_wndproc, wndproc; IDXGIFactory *factory, *factory2; IDXGISwapChain *swapchain; + IDXGIOutput *output; IDXGIAdapter *adapter; IDXGIDevice *device; HWND hwnd, hwnd2; @@ -5448,11 +5449,15 @@ static void test_window_association(void) PostMessageA(swapchain_desc.OutputWindow, WM_SYSKEYDOWN, VK_RETURN, (MapVirtualKeyA(VK_RETURN, MAPVK_VK_TO_VSC) << 16) | 0x20000001); flush_events(); - hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL); + output = NULL; + hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output); ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr); ok(fullscreen == tests[i].expect_fullscreen || broken(tests[i].broken_d3d10 && fullscreen), "Test %u: Got unexpected fullscreen %#x.\n", i, fullscreen); + todo_wine_if(fullscreen) ok(fullscreen ? !!output : !output, "Got wrong output.\n"); + if (output) + IDXGIOutput_Release(output); wndproc = GetWindowLongPtrW(swapchain_desc.OutputWindow, GWLP_WNDPROC); ok(wndproc == original_wndproc, "Text %u: Got unexpected wndproc %#lx, expected %#lx.\n", -- 2.20.1