Module: wine Branch: master Commit: f5204b8afe4b42c09dd369239f0ca9b14c6fcff4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f5204b8afe4b42c09dd369239f...
Author: Markus Amsler markus.amsler@oribi.org Date: Thu Nov 30 13:33:40 2006 +0100
Revert "d3d: Remove AddRef from IWineD3DDevice_GetDepthStencilSurface.".
This reverts commit 18546a65e6e68427ed49c4ea5a601972fb8a4de0.
---
dlls/d3d8/device.c | 1 + dlls/d3d9/device.c | 1 + dlls/wined3d/device.c | 4 ++++ 3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 2c9329f..0baa5ac 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -698,6 +698,7 @@ static HRESULT WINAPI IDirect3DDevice8 hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); if(hr == D3D_OK && pZStencilSurface != NULL){ IWineD3DResource_GetParent((IWineD3DResource *)pZStencilSurface,(IUnknown**)ppZStencilSurface); + IWineD3DResource_Release((IWineD3DResource *)pZStencilSurface); }else{ FIXME("Call to IWineD3DDevice_GetDepthStencilSurface failed\n"); *ppZStencilSurface = NULL; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 34a2e1c..9b31289 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -433,6 +433,7 @@ static HRESULT WINAPI IDirect3DDevice9 hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); if(hr == D3D_OK && pZStencilSurface != NULL){ IWineD3DResource_GetParent((IWineD3DResource *)pZStencilSurface,(IUnknown**)ppZStencilSurface); + IWineD3DResource_Release((IWineD3DResource *)pZStencilSurface); }else{ FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n"); *ppZStencilSurface = NULL; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 26e24c6..4ae70a5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6990,6 +6990,10 @@ static HRESULT WINAPI IWineD3DDeviceIm *ppZStencilSurface = This->depthStencilBuffer; TRACE("(%p) : zStencilSurface returning %p\n", This, *ppZStencilSurface);
+ if(*ppZStencilSurface != NULL) { + /* Note inc ref on returned surface */ + IWineD3DSurface_AddRef(*ppZStencilSurface); + } return WINED3D_OK; }