d3d8: Update the BackBufferCount after a successful reset.

oldstable
Henri Verbeet 2015-04-14 10:16:03 +02:00 committed by Alexandre Julliard
parent 3ccac1a71f
commit 69047ed4f7
2 changed files with 2 additions and 1 deletions

View File

@ -670,6 +670,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
if (SUCCEEDED(hr = wined3d_device_reset(device->wined3d_device, &swapchain_desc,
NULL, reset_enum_callback, TRUE)))
{
present_parameters->BackBufferCount = swapchain_desc.backbuffer_count;
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0);
device->device_state = D3D8_DEVICE_STATE_OK;
}

View File

@ -1359,7 +1359,7 @@ static void test_reset(void)
ok(!d3dpp.BackBufferHeight, "Got unexpected BackBufferHeight %u.\n", d3dpp.BackBufferHeight);
ok(d3dpp.BackBufferFormat == d3ddm.Format, "Got unexpected BackBufferFormat %#x, expected %#x.\n",
d3dpp.BackBufferFormat, d3ddm.Format);
todo_wine ok(d3dpp.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", d3dpp.BackBufferCount);
ok(d3dpp.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", d3dpp.BackBufferCount);
ok(!d3dpp.MultiSampleType, "Got unexpected MultiSampleType %u.\n", d3dpp.MultiSampleType);
ok(d3dpp.SwapEffect == D3DSWAPEFFECT_DISCARD, "Got unexpected SwapEffect %#x.\n", d3dpp.SwapEffect);
ok(!d3dpp.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", d3dpp.hDeviceWindow);