Module: wine Branch: master Commit: 5bec2f57a1d07b6ca0e47f95dea1c55bd3ddb20b URL: http://source.winehq.org/git/wine.git/?a=commit;h=5bec2f57a1d07b6ca0e47f95de...
Author: Markus Amsler markus.amsler@oribi.org Date: Thu Nov 30 13:33:29 2006 +0100
Revert "d3d: Remove AddRef from IWineD3DDevice_GetTexture.".
This reverts commit 274df6ef88fb16da6c61fc891db74042fec0bfc5.
---
dlls/d3d8/device.c | 1 + dlls/d3d9/device.c | 1 + dlls/ddraw/device.c | 1 + dlls/wined3d/device.c | 2 ++ 4 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 2da8063..2c9329f 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -963,6 +963,7 @@ static HRESULT WINAPI IDirect3DDevice8Im rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture); if (rc == D3D_OK && NULL != retTexture) { IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture); + IWineD3DBaseTexture_Release(retTexture); } else { FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture); *ppTexture = NULL; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 62c79c1..34a2e1c 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -595,6 +595,7 @@ static HRESULT WINAPI IDirect3DDevice9 rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture); if (rc == D3D_OK && NULL != retTexture) { IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture); + IWineD3DBaseTexture_Release(retTexture); }else{ FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture); *ppTexture = NULL; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 11435cf..cfbbba9 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2130,6 +2130,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDi *Value = texImpl->Handle; IDirectDrawSurface7_Release(parent); } + IWineD3DBaseTexture_Release(tex); } return hr; } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 616cf4c..26e24c6 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5836,6 +5836,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl return WINED3DERR_INVALIDCALL; } *ppTexture=This->stateBlock->textures[Stage]; + if (*ppTexture) + IWineD3DBaseTexture_AddRef(*ppTexture);
return WINED3D_OK; }