From 90db63ab2de48bb3869d6de66701ad88fc1c0ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 22 Jan 2018 14:11:53 +0100 Subject: [PATCH] dxgi/tests: Zero swapchain descriptions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/dxgi/tests/device.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c index 77b7cb70c38..18306db7481 100644 --- a/dlls/dxgi/tests/device.c +++ b/dlls/dxgi/tests/device.c @@ -2604,6 +2604,7 @@ static void test_swapchain_resize(void) ok(EqualRect(&r, &client_rect), "Got unexpected rect %s, expected %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&client_rect)); + memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); ok(swapchain_desc.BufferDesc.Width == 640, @@ -2668,6 +2669,7 @@ static void test_swapchain_resize(void) ok(EqualRect(&r, &client_rect), "Got unexpected rect %s, expected %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&client_rect)); + memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); ok(swapchain_desc.BufferDesc.Width == 640, @@ -2738,6 +2740,7 @@ static void test_swapchain_resize(void) ok(EqualRect(&r, &client_rect), "Got unexpected rect %s, expected %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&client_rect)); + memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); ok(swapchain_desc.BufferDesc.Width == 320, @@ -2800,6 +2803,7 @@ static void test_swapchain_resize(void) hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); ok(SUCCEEDED(hr), "Failed to resize buffers, hr %#x.\n", hr); + memset(&swapchain_desc, 0, sizeof(swapchain_desc)); hr = IDXGISwapChain_GetDesc(swapchain, &swapchain_desc); ok(SUCCEEDED(hr), "Failed to get swapchain desc, hr %#x.\n", hr); ok(swapchain_desc.BufferDesc.Width == client_rect.right - client_rect.left,