Elie Morisse : ddraw: Don' t destroy complex attached surfaces even if explicitely

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 3 13:37:42 CDT 2006


Module: wine
Branch: master
Commit: f9593bfe67aaacc17e7dccc9c634b1e7ca817de4
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=f9593bfe67aaacc17e7dccc9c634b1e7ca817de4

Author: Elie Morisse <lachienne at wanadoo.fr>
Date:   Fri Sep 22 18:55:39 2006 +0400

ddraw: Don't destroy complex attached surfaces even if explicitely
requested as they will be liquidated anyway when the root is
destroyed.

---

 dlls/ddraw/surface.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 74987bf..111fa9e 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -293,14 +293,11 @@ IDirectDrawSurfaceImpl_Release(IDirectDr
         IDirectDrawImpl *ddraw;
         IUnknown *ifaceToRelease = This->ifaceToRelease;
 
-        /* Destroy all complex attached surfaces
-         * Therefore, start with the first surface,
-         * except for textures. Not entirely sure what has
-         * to happen exactly in this case
-         */
-        if( (This->first_complex != This) && !(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
+        /* Complex attached surfaces are destroyed implicitely when the root is released */
+        if(This->first_complex != This)
         {
-            FIXME("(%p) Destroying a surface which is a attached to a complex root %p\n", This, This->first_complex);
+            WARN("(%p) Attempt to destroy a surface that is attached to a complex root %p\n", This, This->first_complex);
+            return ref;
         }
         ddraw = This->ddraw;
 




More information about the wine-cvs mailing list