[PATCH 4/5] ddraw: Remove rectangle validation from ddraw_surface7_Blt().
Henri Verbeet
hverbeet at codeweavers.com
Wed Aug 3 14:34:47 CDT 2011
This is already done by wined3d_surface_blt().
---
dlls/ddraw/surface.c | 23 -----------------------
1 files changed, 0 insertions(+), 23 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 7aec492..b51c360 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");
--
1.7.3.4
More information about the wine-patches
mailing list