From 69047ed4f7e2b0799f639691b30ac4ad5059b06f Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 14 Apr 2015 10:16:03 +0200 Subject: [PATCH] d3d8: Update the BackBufferCount after a successful reset. --- dlls/d3d8/device.c | 1 + dlls/d3d8/tests/device.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 464aced2fa2..10c210344ae 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -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; } diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 92ec3d0cad2..64c29116823 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -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);