Commit b545c1eb authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

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

parent c061b3e2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment