From 92e616f355ded5f3634625dba245e9b437e3ad6a Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 3 Aug 2011 21:34:47 +0200 Subject: [PATCH] ddraw: Remove rectangle validation from ddraw_surface7_Blt(). This is already done by wined3d_surface_blt(). --- dlls/ddraw/surface.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 7aec492bf42..b51c360aa54 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -1211,30 +1211,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR return DDERR_INVALIDPARAMS; } - /* Sizes can change, therefore hold the lock when testing the rectangles */ EnterCriticalSection(&ddraw_cs); - if(DestRect) - { - if(DestRect->top >= DestRect->bottom || DestRect->left >= DestRect->right || - DestRect->right > This->surface_desc.dwWidth || - DestRect->bottom > This->surface_desc.dwHeight) - { - WARN("Destination rectangle is invalid, returning DDERR_INVALIDRECT\n"); - LeaveCriticalSection(&ddraw_cs); - return DDERR_INVALIDRECT; - } - } - if(Src && SrcRect) - { - if(SrcRect->top >= SrcRect->bottom || SrcRect->left >=SrcRect->right || - SrcRect->right > Src->surface_desc.dwWidth || - SrcRect->bottom > Src->surface_desc.dwHeight) - { - WARN("Source rectangle is invalid, returning DDERR_INVALIDRECT\n"); - LeaveCriticalSection(&ddraw_cs); - return DDERR_INVALIDRECT; - } - } if(Flags & DDBLT_KEYSRC && (!Src || !(Src->surface_desc.dwFlags & DDSD_CKSRCBLT))) { WARN("DDBLT_KEYDEST blit without color key in surface, returning DDERR_INVALIDPARAMS\n");