d3d: Remove AddRef from IWineD3DDevice_GetBackBuffer.
This commit is contained in:
parent
167b83c28a
commit
478a414e58
|
@ -295,7 +295,6 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetBackBuffer(LPDIRECT3DDEVICE8 iface
|
|||
rc = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, 0, BackBuffer, (WINED3DBACKBUFFER_TYPE) Type, (IWineD3DSurface **)&retSurface);
|
||||
if (rc == D3D_OK && NULL != retSurface && NULL != ppBackBuffer) {
|
||||
IWineD3DSurface_GetParent(retSurface, (IUnknown **)ppBackBuffer);
|
||||
IWineD3DSurface_Release(retSurface);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,6 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8
|
|||
hrc = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, (WINED3DBACKBUFFER_TYPE )Type, &mySurface);
|
||||
if (hrc == D3D_OK && NULL != mySurface) {
|
||||
IWineD3DSurface_GetParent(mySurface, (IUnknown **)ppBackBuffer);
|
||||
IWineD3DSurface_Release(mySurface);
|
||||
}
|
||||
return hrc;
|
||||
}
|
||||
|
|
|
@ -205,7 +205,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetBackBuffer(LPDIRECT3DDEVICE9 ifa
|
|||
rc = IWineD3DDevice_GetBackBuffer(This->WineD3DDevice, iSwapChain, BackBuffer, (WINED3DBACKBUFFER_TYPE) Type, (IWineD3DSurface **)&retSurface);
|
||||
if (rc == D3D_OK && NULL != retSurface && NULL != ppBackBuffer) {
|
||||
IWineD3DSurface_GetParent(retSurface, (IUnknown **)ppBackBuffer);
|
||||
IWineD3DSurface_Release(retSurface);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,6 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN9
|
|||
hrc = IWineD3DSwapChain_GetBackBuffer(This->wineD3DSwapChain, iBackBuffer, (WINED3DBACKBUFFER_TYPE) Type, &mySurface);
|
||||
if (hrc == D3D_OK && NULL != mySurface) {
|
||||
IWineD3DSurface_GetParent(mySurface, (IUnknown **)ppBackBuffer);
|
||||
IWineD3DSurface_Release(mySurface);
|
||||
}
|
||||
/* Do not touch the **ppBackBuffer pointer otherwise! (see device test) */
|
||||
return hrc;
|
||||
|
|
|
@ -1212,9 +1212,6 @@ IDirectDrawImpl_GetGDISurface(IDirectDraw7 *iface,
|
|||
return DDERR_NOTFOUND;
|
||||
}
|
||||
|
||||
/* GetBackBuffer AddRef()ed the surface, release it */
|
||||
IWineD3DSurface_Release(Surf);
|
||||
|
||||
IWineD3DSurface_GetParent(Surf,
|
||||
(IUnknown **) &ddsurf);
|
||||
IDirectDrawSurface7_Release(ddsurf); /* For the GetParent */
|
||||
|
|
|
@ -461,8 +461,6 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *ifa
|
|||
*ppBackBuffer = This->backBuffer[iBackBuffer];
|
||||
TRACE("(%p) : BackBuf %d Type %d returning %p\n", This, iBackBuffer, Type, *ppBackBuffer);
|
||||
|
||||
/* Note inc ref on returned surface */
|
||||
if(*ppBackBuffer) IWineD3DSurface_AddRef(*ppBackBuffer);
|
||||
return WINED3D_OK;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue