[PATCH 2/5] ddrawex: Get rid of dds_get_inner().

Michael Stefaniuc mstefani at redhat.de
Fri Aug 17 09:07:56 CDT 2012


---
 dlls/ddrawex/ddraw.c           |    4 +++-
 dlls/ddrawex/ddrawex_private.h |    1 -
 dlls/ddrawex/surface.c         |    7 -------
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/dlls/ddrawex/ddraw.c b/dlls/ddrawex/ddraw.c
index ab3c731..6d2e400 100644
--- a/dlls/ddrawex/ddraw.c
+++ b/dlls/ddrawex/ddraw.c
@@ -459,9 +459,11 @@ static HRESULT WINAPI IDirectDraw4Impl_DuplicateSurface(IDirectDraw4 *iface,
         IDirectDrawSurface4 *src, IDirectDrawSurface4 **dst)
 {
     IDirectDrawImpl *This = impl_from_IDirectDraw4(iface);
+    IDirectDrawSurfaceImpl *surf = unsafe_impl_from_IDirectDrawSurface4(src);
+
     FIXME("(%p)->(%p,%p). Create a wrapper surface\n", This, src, dst);
 
-    return IDirectDraw4_DuplicateSurface(This->parent, dds_get_inner(src), dst);
+    return IDirectDraw4_DuplicateSurface(This->parent, surf ? surf->parent : NULL, dst);
 }
 
 static HRESULT WINAPI IDirectDraw3Impl_DuplicateSurface(IDirectDraw3 *iface,
diff --git a/dlls/ddrawex/ddrawex_private.h b/dlls/ddrawex/ddrawex_private.h
index 1db3412..e533743 100644
--- a/dlls/ddrawex/ddrawex_private.h
+++ b/dlls/ddrawex/ddrawex_private.h
@@ -91,7 +91,6 @@ typedef struct
 
 IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface) DECLSPEC_HIDDEN;
 IDirectDrawSurface4 *dds_get_outer(IDirectDrawSurface4 *inner) DECLSPEC_HIDDEN;
-IDirectDrawSurface4 *dds_get_inner(IDirectDrawSurface4 *outer) DECLSPEC_HIDDEN;
 HRESULT prepare_permanent_dc(IDirectDrawSurface4 *iface) DECLSPEC_HIDDEN;
 
 #endif /* __WINE_DLLS_DDRAWEX_DDRAWEX_PRIVATE_H */
diff --git a/dlls/ddrawex/surface.c b/dlls/ddrawex/surface.c
index 886e0f7..cb1e89d 100644
--- a/dlls/ddrawex/surface.c
+++ b/dlls/ddrawex/surface.c
@@ -1220,13 +1220,6 @@ IDirectDrawSurface4 *dds_get_outer(IDirectDrawSurface4 *inner)
     return outer;
 }
 
-IDirectDrawSurface4 *dds_get_inner(IDirectDrawSurface4 *outer)
-{
-    IDirectDrawSurfaceImpl *This = impl_from_dds4(outer);
-    if(This == NULL) return NULL;
-    return This->parent;
-}
-
 HRESULT prepare_permanent_dc(IDirectDrawSurface4 *iface)
 {
     IDirectDrawSurfaceImpl *This = unsafe_impl_from_IDirectDrawSurface4(iface);
-- 
1.7.6.5



More information about the wine-patches mailing list