Commit 92e616f3 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Remove rectangle validation from ddraw_surface7_Blt().

This is already done by wined3d_surface_blt().
parent 7e3ecd68
...@@ -1211,30 +1211,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR ...@@ -1211,30 +1211,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
/* Sizes can change, therefore hold the lock when testing the rectangles */
EnterCriticalSection(&ddraw_cs); 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))) { if(Flags & DDBLT_KEYSRC && (!Src || !(Src->surface_desc.dwFlags & DDSD_CKSRCBLT))) {
WARN("DDBLT_KEYDEST blit without color key in surface, returning DDERR_INVALIDPARAMS\n"); WARN("DDBLT_KEYDEST blit without color key in surface, returning DDERR_INVALIDPARAMS\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment