[PATCH 2/5] wined3d: Split checking for "empty" source and destination rectangles in IWineD3DBaseSurfaceImpl_Blt().
Henri Verbeet
hverbeet at codeweavers.com
Thu May 20 02:12:19 CDT 2010
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)
--
1.6.4.4
More information about the wine-patches
mailing list