Commit b657cd5f authored by Markus Amsler's avatar Markus Amsler Committed by Alexandre Julliard

Revert "d3d: Remove AddRef from IWineD3DDevice_GetRenderTarget.".

This reverts commit a7518f6f.
parent f5204b8a
...@@ -677,6 +677,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 i ...@@ -677,6 +677,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 i
if (hr == D3D_OK && pRenderTarget != NULL) { if (hr == D3D_OK && pRenderTarget != NULL) {
IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget); IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget);
IWineD3DResource_Release((IWineD3DResource *)pRenderTarget);
} else { } else {
FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n"); FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
*ppRenderTarget = NULL; *ppRenderTarget = NULL;
......
...@@ -403,6 +403,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9 i ...@@ -403,6 +403,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9 i
if (hr == D3D_OK && pRenderTarget != NULL) { if (hr == D3D_OK && pRenderTarget != NULL) {
IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget); IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget);
IWineD3DResource_Release((IWineD3DResource *)pRenderTarget);
} else { } else {
FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n"); FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
*ppRenderTarget = NULL; *ppRenderTarget = NULL;
......
...@@ -6898,7 +6898,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface ...@@ -6898,7 +6898,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface
*ppRenderTarget = This->renderTarget; *ppRenderTarget = This->renderTarget;
TRACE("(%p) : RenderTarget %d Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget); TRACE("(%p) : RenderTarget %d Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget);
/* Note inc ref on returned surface */
if(*ppRenderTarget != NULL)
IWineD3DSurface_AddRef(*ppRenderTarget);
return WINED3D_OK; return WINED3D_OK;
} }
......
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