Module: wine Branch: master Commit: 463162b4143ee03193aade846acb7202ba3f7f5a URL: http://source.winehq.org/git/wine.git/?a=commit;h=463162b4143ee03193aade846a...
Author: Stefan Dösinger stefan@codeweavers.com Date: Mon Apr 25 16:51:27 2011 +0200
d3d8: Don't reapply the old DS if SetDepthStencilSurface failed.
---
dlls/d3d8/device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 47a727d..ae90a16 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -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);