ddraw: Reset the stateblock state before calling wined3d_device_reset().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0508cb848f
commit
6c51a93b63
|
@ -6068,14 +6068,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
|||
swapchain_desc.backbuffer_height = mode.height;
|
||||
swapchain_desc.backbuffer_format = mode.format_id;
|
||||
|
||||
if (FAILED(hr = wined3d_device_reset(ddraw->wined3d_device,
|
||||
&swapchain_desc, NULL, ddraw_reset_enum_callback, TRUE)))
|
||||
{
|
||||
ERR("Failed to reset device.\n");
|
||||
heap_free(texture);
|
||||
return hr_ddraw_from_wined3d(hr);
|
||||
}
|
||||
|
||||
if (ddraw->d3ddevice)
|
||||
{
|
||||
if (ddraw->d3ddevice->recording)
|
||||
|
@ -6083,6 +6075,15 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
|||
ddraw->d3ddevice->recording = NULL;
|
||||
ddraw->d3ddevice->update_state = ddraw->d3ddevice->state;
|
||||
}
|
||||
wined3d_stateblock_reset(ddraw->state);
|
||||
|
||||
if (FAILED(hr = wined3d_device_reset(ddraw->wined3d_device,
|
||||
&swapchain_desc, NULL, ddraw_reset_enum_callback, TRUE)))
|
||||
{
|
||||
ERR("Failed to reset device.\n");
|
||||
heap_free(texture);
|
||||
return hr_ddraw_from_wined3d(hr);
|
||||
}
|
||||
|
||||
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
|
||||
!!swapchain_desc.enable_auto_depth_stencil);
|
||||
|
|
Loading…
Reference in New Issue