ddraw: Pass non-NULL rectangles to wined3d_surface_blt() in ddraw_surface_update_frontbuffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2cbb757abe
commit
492e785513
|
@ -46,21 +46,18 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
RECT r;
|
||||||
|
|
||||||
if (!rect)
|
if (!rect)
|
||||||
{
|
{
|
||||||
x = 0;
|
SetRect(&r, 0, 0, surface->surface_desc.dwWidth, surface->surface_desc.dwHeight);
|
||||||
y = 0;
|
rect = &r;
|
||||||
w = surface->surface_desc.dwWidth;
|
|
||||||
h = surface->surface_desc.dwHeight;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
x = rect->left;
|
x = rect->left;
|
||||||
y = rect->top;
|
y = rect->top;
|
||||||
w = rect->right - rect->left;
|
w = rect->right - rect->left;
|
||||||
h = rect->bottom - rect->top;
|
h = rect->bottom - rect->top;
|
||||||
}
|
|
||||||
|
|
||||||
if (w <= 0 || h <= 0)
|
if (w <= 0 || h <= 0)
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
|
|
Loading…
Reference in New Issue