Commit beefff00 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

d3d8/tests: Test the presentation parameters after creating a device.

parent 7a9fba29
......@@ -8896,6 +8896,33 @@ static void test_swapchain_parameters(void)
IDirect3DDevice8_Release(device);
}
memset(&present_parameters, 0, sizeof(present_parameters));
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
present_parameters.Windowed = TRUE;
present_parameters.BackBufferWidth = 0;
present_parameters.BackBufferHeight = 0;
present_parameters.BackBufferFormat = D3DFMT_X8R8G8B8;
hr = IDirect3D8_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
window, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&present_parameters, &device);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!present_parameters.BackBufferWidth, "Got unexpected BackBufferWidth %u.\n", present_parameters.BackBufferWidth);
ok(!present_parameters.BackBufferHeight, "Got unexpected BackBufferHeight %u,.\n", present_parameters.BackBufferHeight);
ok(present_parameters.BackBufferFormat == D3DFMT_X8R8G8B8, "Got unexpected BackBufferFormat %#x.\n", present_parameters.BackBufferFormat);
ok(present_parameters.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", present_parameters.BackBufferCount);
ok(!present_parameters.MultiSampleType, "Got unexpected MultiSampleType %u.\n", present_parameters.MultiSampleType);
ok(present_parameters.SwapEffect == D3DSWAPEFFECT_DISCARD, "Got unexpected SwapEffect %#x.\n", present_parameters.SwapEffect);
ok(!present_parameters.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", present_parameters.hDeviceWindow);
ok(present_parameters.Windowed, "Got unexpected Windowed %#x.\n", present_parameters.Windowed);
ok(!present_parameters.EnableAutoDepthStencil, "Got unexpected EnableAutoDepthStencil %#x.\n", present_parameters.EnableAutoDepthStencil);
ok(!present_parameters.AutoDepthStencilFormat, "Got unexpected AutoDepthStencilFormat %#x.\n", present_parameters.AutoDepthStencilFormat);
ok(!present_parameters.Flags, "Got unexpected Flags %#lx.\n", present_parameters.Flags);
ok(!present_parameters.FullScreen_RefreshRateInHz, "Got unexpected FullScreen_RefreshRateInHz %u.\n", present_parameters.FullScreen_RefreshRateInHz);
ok(!present_parameters.FullScreen_PresentationInterval, "Got unexpected FullScreen_PresentationInterval %#x.\n", present_parameters.FullScreen_PresentationInterval);
IDirect3DDevice8_Release(device);
IDirect3D8_Release(d3d);
DestroyWindow(window);
}
......
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