Module: wine Branch: master Commit: c48ff6c12a35703a3c982ca2db40870c4639bab4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c48ff6c12a35703a3c982ca2db...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu May 20 09:12:19 2010 +0200
wined3d: Split checking for "empty" source and destination rectangles in IWineD3DBaseSurfaceImpl_Blt().
Assuming this is supposed to check for empty source / destination rectangles, the check doesn't look quite right to me. I'm going to leave that alone for the time being though.
---
dlls/wined3d/surface_base.c | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 9778c81..43642de 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -1020,21 +1020,24 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D return WINEDDERR_INVALIDRECT; }
- /* Now handle negative values in the rectangles. Warning: only supported for now - in the 'simple' cases (ie not in any stretching / rotation cases). - - First, the case where nothing is to be done. - */ - if ((DestRect && ((DestRect->bottom <= 0) || (DestRect->right <= 0) || - (DestRect->top >= (int) This->currentDesc.Height) || - (DestRect->left >= (int) This->currentDesc.Width))) || - ((Src != NULL) && (SrcRect != NULL) && - ((SrcRect->bottom <= 0) || (SrcRect->right <= 0) || - (SrcRect->top >= (int) Src->currentDesc.Height) || - (SrcRect->left >= (int) Src->currentDesc.Width)) )) + /* Now handle negative values in the rectangles. Warning: only supported + * for now in the 'simple' cases (ie not in any stretching / rotation + * cases). First, the case where nothing is to be done. */ + + if (DestRect && (DestRect->bottom <= 0 || DestRect->right <= 0 + || DestRect->top >= (int)This->currentDesc.Height + || DestRect->left >= (int)This->currentDesc.Width)) + { + TRACE("Nothing to be done.\n"); + return WINED3D_OK; + } + + if (Src && SrcRect && (SrcRect->bottom <= 0 || SrcRect->right <= 0 + || SrcRect->top >= (int)Src->currentDesc.Height + || SrcRect->left >= (int)Src->currentDesc.Width)) { - TRACE("Nothing to be done !\n"); - return WINED3D_OK; + TRACE("Nothing to be done.\n"); + return WINED3D_OK; }
if (DestRect)