Commit 06038793 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ddraw: Use SetRect() instead of open coding it.

parent b05b96a0
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment