Module: wine Branch: master Commit: 866099765ae2e5039b5676ee0ee8bf15313a0570 URL: http://source.winehq.org/git/wine.git/?a=commit;h=866099765ae2e5039b5676ee0e...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Sun Aug 22 23:35:39 2010 +0200
ddraw: Attaching an already attached surface is not a FIXME.
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; }