Commit 463162b4 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

d3d8: Don't reapply the old DS if SetDepthStencilSurface failed.

parent 0036e438
......@@ -1047,8 +1047,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(IDirect3DDevice8 *ifa
{
hr = IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, pZSurface ? pZSurface->wineD3DSurface : NULL);
if (SUCCEEDED(hr) && pSurface)
{
hr = IWineD3DDevice_SetRenderTarget(This->WineD3DDevice, 0, pSurface->wineD3DSurface, TRUE);
if (FAILED(hr)) IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, original_ds);
if (FAILED(hr)) IWineD3DDevice_SetDepthStencilSurface(This->WineD3DDevice, original_ds);
}
}
if (original_ds) IWineD3DSurface_Release(original_ds);
......
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