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>
This commit is contained in:
parent
128e6b5975
commit
08201eef3c
|
@ -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
|
* 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.
|
* mip level subset, so an error can be returned early.
|
||||||
*/
|
*/
|
||||||
if (srcrect.left >= srcrect.right || srcrect.top >= srcrect.bottom ||
|
if (IsRectEmpty(&srcrect) || srcrect.right > src->surface_desc.dwWidth ||
|
||||||
srcrect.right > src->surface_desc.dwWidth ||
|
|
||||||
srcrect.bottom > src->surface_desc.dwHeight ||
|
srcrect.bottom > src->surface_desc.dwHeight ||
|
||||||
destpoint.x + srcrect.right - srcrect.left > src->surface_desc.dwWidth ||
|
destpoint.x + srcrect.right - srcrect.left > src->surface_desc.dwWidth ||
|
||||||
destpoint.y + srcrect.bottom - srcrect.top > src->surface_desc.dwHeight ||
|
destpoint.y + srcrect.bottom - srcrect.top > src->surface_desc.dwHeight ||
|
||||||
|
|
Loading…
Reference in New Issue