[PATCH 3/5] ddraw: Attaching an already attached surface is not a FIXME.

Henri Verbeet hverbeet at codeweavers.com
Sun Aug 22 16:35:39 CDT 2010


According to the tests it should simply fail.
---
 dlls/ddraw/surface.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 6b6b257..8583bc8 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -988,13 +988,14 @@ static HRESULT WINAPI ddraw_surface_attach_surface(IDirectDrawSurfaceImpl *This,
     EnterCriticalSection(&ddraw_cs);
 
     /* Check if the surface is already attached somewhere */
-    if( (Surf->next_attached != NULL) ||
-        (Surf->first_attached != Surf) )
+    if (Surf->next_attached || Surf->first_attached != Surf)
     {
-        /* TODO: Test for the structure of the manual attachment. Is it a chain or a list?
-         * What happens if one surface is attached to 2 different surfaces?
-         */
-        FIXME("(%p) The Surface %p is already attached somewhere else: next_attached = %p, first_attached = %p, can't handle by now\n", This, Surf, Surf->next_attached, Surf->first_attached);
+        /* TODO: Test for the structure of the manual attachment. Is it a
+         * chain or a list? What happens if one surface is attached to 2
+         * different surfaces? */
+        WARN("Surface %p is already attached somewhere. next_attached %p, first_attached %p.\n",
+                Surf, Surf->next_attached, Surf->first_attached);
+
         LeaveCriticalSection(&ddraw_cs);
         return DDERR_SURFACEALREADYATTACHED;
     }
-- 
1.7.1




More information about the wine-patches mailing list