From 6ae96807c0c0e39d7b17b95b07f6cab645f7770d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 29 Mar 2010 13:31:08 +0200 Subject: [PATCH] ddrawex: Directly return the ddraw surface in IDirectDraw4Impl_GetSurfaceFromDC(). --- dlls/ddrawex/ddraw.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dlls/ddrawex/ddraw.c b/dlls/ddrawex/ddraw.c index 4c757ecc0e..8c6b937b00 100644 --- a/dlls/ddrawex/ddraw.c +++ b/dlls/ddrawex/ddraw.c @@ -1320,20 +1320,9 @@ IDirectDraw4Impl_GetSurfaceFromDC(IDirectDraw4 *iface, IDirectDrawSurface4 **Surface) { IDirectDrawImpl *This = impl_from_dd4(iface); - IDirectDrawSurface4 *inner; HRESULT hr; TRACE("(%p)->(%p, %p)\n", This, hdc, Surface); - hr = IDirectDraw4_GetSurfaceFromDC(This->parent,hdc, &inner); - if(SUCCEEDED(hr)) - { - *Surface = dds_get_outer(inner); - IDirectDrawSurface4_AddRef(*Surface); - IDirectDrawSurface4_Release(inner); - } - else - { - *Surface = NULL; - } + hr = IDirectDraw4_GetSurfaceFromDC(This->parent,hdc, Surface); return hr; }