d3d8: Don't reapply the old DS if SetDepthStencilSurface failed.
This commit is contained in:
parent
0036e438db
commit
463162b414
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue