ddraw: Use SetRect() 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:
Michael Stefaniuc 2016-03-22 10:31:25 +01:00 committed by Alexandre Julliard
parent b05b96a0e2
commit 060387936d
2 changed files with 5 additions and 21 deletions

View File

@ -6077,11 +6077,7 @@ static HRESULT d3d_device7_Load(IDirect3DDevice7 *iface, IDirectDrawSurface7 *ds
wined3d_mutex_lock();
if (!src_rect)
{
srcrect.left = srcrect.top = 0;
srcrect.right = src->surface_desc.dwWidth;
srcrect.bottom = src->surface_desc.dwHeight;
}
SetRect(&srcrect, 0, 0, src->surface_desc.dwWidth, src->surface_desc.dwHeight);
else
srcrect = *src_rect;

View File

@ -1407,16 +1407,10 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
UINT i;
if (!dst_rect_in)
{
dst_rect.left = 0;
dst_rect.top = 0;
dst_rect.right = dst_surface->surface_desc.dwWidth;
dst_rect.bottom = dst_surface->surface_desc.dwHeight;
}
SetRect(&dst_rect, 0, 0, dst_surface->surface_desc.dwWidth,
dst_surface->surface_desc.dwHeight);
else
{
dst_rect = *dst_rect_in;
}
if (IsRectEmpty(&dst_rect))
return DDERR_INVALIDRECT;
@ -1424,16 +1418,10 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
if (src_surface)
{
if (!src_rect_in)
{
src_rect.left = 0;
src_rect.top = 0;
src_rect.right = src_surface->surface_desc.dwWidth;
src_rect.bottom = src_surface->surface_desc.dwHeight;
}
SetRect(&src_rect, 0, 0, src_surface->surface_desc.dwWidth,
src_surface->surface_desc.dwHeight);
else
{
src_rect = *src_rect_in;
}
if (IsRectEmpty(&src_rect))
return DDERR_INVALIDRECT;