d3d10core/tests: Make the window client rect match the d3d swapchain size.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2016-10-13 01:04:08 +02:00 committed by Alexandre Julliard
parent c061b3e2ec
commit b545c1eb1c
1 changed files with 8 additions and 2 deletions

View File

@ -920,6 +920,7 @@ static BOOL init_test_context_(unsigned int line, struct d3d10core_test_context
{
D3D10_VIEWPORT vp;
HRESULT hr;
RECT rect;
memset(context, 0, sizeof(*context));
@ -928,8 +929,10 @@ static BOOL init_test_context_(unsigned int line, struct d3d10core_test_context
skip_(__FILE__, line)("Failed to create device.\n");
return FALSE;
}
SetRect(&rect, 0, 0, 640, 480);
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW | WS_VISIBLE, FALSE);
context->window = CreateWindowA("static", "d3d10core_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
0, 0, 640, 480, NULL, NULL, NULL, NULL);
0, 0, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, NULL);
context->swapchain = create_swapchain(context->device, context->window, NULL);
hr = IDXGISwapChain_GetBuffer(context->swapchain, 0, &IID_ID3D10Texture2D, (void **)&context->backbuffer);
ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get backbuffer, hr %#x.\n", hr);
@ -7396,6 +7399,7 @@ static void test_swapchain_flip(void)
DWORD color;
HWND window;
HRESULT hr;
RECT rect;
static const D3D10_INPUT_ELEMENT_DESC layout_desc[] =
{
@ -7476,8 +7480,10 @@ static void test_swapchain_flip(void)
skip("Failed to create device, skipping tests.\n");
return;
}
SetRect(&rect, 0, 0, 640, 480);
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW | WS_VISIBLE, FALSE);
window = CreateWindowA("static", "d3d10core_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
0, 0, 640, 480, NULL, NULL, NULL, NULL);
0, 0, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, NULL, NULL);
desc.buffer_count = 3;
desc.swap_effect = DXGI_SWAP_EFFECT_SEQUENTIAL;
desc.windowed = TRUE;