Module: wine Branch: master Commit: 08201eef3cac11cbab5a923adc5cb939a8a2868b URL: http://source.winehq.org/git/wine.git/?a=commit;h=08201eef3cac11cbab5a923adc...
Author: Michael Stefaniuc mstefani@redhat.de Date: Tue May 3 21:43:55 2016 +0200
ddraw: Use IsRectEmpty() instead of open coding it.
Signed-off-by: Michael Stefaniuc mstefani@redhat.de Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ddraw/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 80a2f0b..1edf8fe 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -6118,8 +6118,7 @@ static HRESULT d3d_device7_Load(IDirect3DDevice7 *iface, IDirectDrawSurface7 *ds * for it may be divided. If any dimension of dest is larger than source, it can't be * mip level subset, so an error can be returned early. */ - if (srcrect.left >= srcrect.right || srcrect.top >= srcrect.bottom || - srcrect.right > src->surface_desc.dwWidth || + if (IsRectEmpty(&srcrect) || srcrect.right > src->surface_desc.dwWidth || srcrect.bottom > src->surface_desc.dwHeight || destpoint.x + srcrect.right - srcrect.left > src->surface_desc.dwWidth || destpoint.y + srcrect.bottom - srcrect.top > src->surface_desc.dwHeight ||