=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: dxgi/tests: Add test for creating swapchains for windows with empty client rect.
Alexandre Julliard
julliard at winehq.org
Thu May 17 19:10:58 CDT 2018
Module: wine
Branch: master
Commit: 9f96ada78abd7c9d28d482127d48e23931ca2672
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9f96ada78abd7c9d28d482127d48e23931ca2672
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Thu May 17 15:46:55 2018 +0200
dxgi/tests: Add test for creating swapchains for windows with empty client rect.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dxgi/tests/device.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c
index 3ad9683..b18ee59 100644
--- a/dlls/dxgi/tests/device.c
+++ b/dlls/dxgi/tests/device.c
@@ -1385,6 +1385,29 @@ static void test_create_swapchain(void)
expected_width = expected_client_rect->right;
expected_height = expected_client_rect->bottom;
+ creation_desc.BufferDesc.Width = 0;
+ creation_desc.BufferDesc.Height = 0;
+ hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain);
+ ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr);
+ hr = IDXGISwapChain_GetDesc(swapchain, &result_desc);
+ ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr);
+ ok(result_desc.BufferDesc.Width == expected_width, "Got width %u, expected %u.\n",
+ result_desc.BufferDesc.Width, expected_width);
+ ok(result_desc.BufferDesc.Height == expected_height, "Got height %u, expected %u.\n",
+ result_desc.BufferDesc.Height, expected_height);
+ check_swapchain_fullscreen_state(swapchain, &expected_state);
+ IDXGISwapChain_Release(swapchain);
+
+ DestroyWindow(creation_desc.OutputWindow);
+ creation_desc.OutputWindow = CreateWindowA("static", "dxgi_test",
+ WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
+ 1, 1, 0, 0, 0, 0, 0, 0);
+ SetRect(&expected_state.fullscreen_state.window_rect, 1, 1, 1, 1);
+ SetRectEmpty(expected_client_rect);
+ expected_width = expected_height = 8;
+
+ creation_desc.BufferDesc.Width = 0;
+ creation_desc.BufferDesc.Height = 0;
hr = IDXGIFactory_CreateSwapChain(factory, obj, &creation_desc, &swapchain);
ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr);
hr = IDXGISwapChain_GetDesc(swapchain, &result_desc);
More information about the wine-cvs
mailing list