[PATCH v2 2/7] d3d8: Reset the stateblock state before calling wined3d_device_reset().
Zebediah Figura
z.figura12 at gmail.com
Thu Oct 24 13:43:05 CDT 2019
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/d3d8/device.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 53e92707ca..63bf5f4fa2 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -909,13 +909,15 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
device->index_buffer_size = 0;
}
+ if (device->recording)
+ wined3d_stateblock_decref(device->recording);
+ device->recording = NULL;
+ device->update_state = device->state;
+ wined3d_stateblock_reset(device->state);
+
if (SUCCEEDED(hr = wined3d_device_reset(device->wined3d_device, &swapchain_desc,
NULL, reset_enum_callback, TRUE)))
{
- if (device->recording)
- wined3d_stateblock_decref(device->recording);
- device->recording = NULL;
- device->update_state = device->state;
present_parameters->BackBufferCount = swapchain_desc.backbuffer_count;
implicit_swapchain = wined3d_swapchain_get_parent(device->implicit_swapchain);
implicit_swapchain->swap_interval
--
2.20.1
More information about the wine-devel
mailing list