[PATCH] wined3d: Do not release a reference we do not have in IWineD3DSurfaceImpl_Flip().
Henri Verbeet
hverbeet at codeweavers.com
Fri Aug 20 06:56:23 CDT 2010
This fixes a regression introduced by
368e5eb87ae983e4ea2f66b3ca2f4154b36bbcda.
---
dlls/wined3d/surface.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ea66033..dfa124d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2739,7 +2739,7 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) {
static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSurface *override, DWORD Flags) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
IWineD3DSwapChainImpl *swapchain = NULL;
- HRESULT hr;
+
TRACE("(%p)->(%p,%x)\n", This, override, Flags);
/* Flipping is only supported on RenderTargets and overlays*/
@@ -2791,10 +2791,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DS
}
/* Flipping a OpenGL surface -> Use WineD3DDevice::Present */
- hr = IWineD3DSwapChain_Present((IWineD3DSwapChain *)swapchain,
+ return IWineD3DSwapChain_Present((IWineD3DSwapChain *)swapchain,
NULL, NULL, swapchain->win_handle, NULL, 0);
- IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
- return hr;
}
/* Does a direct frame buffer -> texture copy. Stretching is done
--
1.7.1
More information about the wine-patches
mailing list