Commit 223b0736 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Disallow clipped blits in ddraw_surface7_BltFast().

parent 99e5e3ac
......@@ -3869,7 +3869,20 @@ static HRESULT WINAPI ddraw_surface7_BltFast(IDirectDrawSurface7 *iface, DWORD d
flags |= WINEDDBLT_DONOTWAIT;
wined3d_mutex_lock();
hr = ddraw_surface_blt_clipped(This, &dst_rect, src, rsrc, flags, NULL, WINED3DTEXF_POINT);
if (This->clipper)
{
wined3d_mutex_unlock();
WARN("Destination surface has a clipper set, returning DDERR_BLTFASTCANTCLIP.\n");
return DDERR_BLTFASTCANTCLIP;
}
if (src->surface_desc.ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER)
hr = ddraw_surface_update_frontbuffer(src, rsrc, TRUE);
if (SUCCEEDED(hr))
hr = wined3d_surface_blt(This->wined3d_surface, &dst_rect,
src->wined3d_surface, rsrc, flags, NULL, WINED3DTEXF_POINT);
if (SUCCEEDED(hr) && (This->surface_desc.ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER))
hr = ddraw_surface_update_frontbuffer(This, &dst_rect, FALSE);
wined3d_mutex_unlock();
switch(hr)
......
......@@ -332,7 +332,7 @@ static void test_clipper_blt(void)
}
hr = IDirectDrawSurface_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT);
todo_wine ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(dst_surface);
IDirectDrawSurface_Release(src_surface);
......
......@@ -339,7 +339,7 @@ static void test_clipper_blt(void)
}
hr = IDirectDrawSurface_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT);
todo_wine ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_BLTFASTCANTCLIP || broken(hr == E_NOTIMPL /* NT4 */), "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(dst_surface);
IDirectDrawSurface_Release(src_surface);
......
......@@ -634,7 +634,7 @@ static void test_clipper_blt(void)
}
hr = IDirectDrawSurface4_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT);
todo_wine ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface4_Release(dst_surface);
IDirectDrawSurface4_Release(src_surface);
......
......@@ -627,7 +627,7 @@ static void test_clipper_blt(void)
}
hr = IDirectDrawSurface7_BltFast(dst_surface, 0, 0, src_surface, NULL, DDBLTFAST_WAIT);
todo_wine ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_BLTFASTCANTCLIP, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface7_Release(dst_surface);
IDirectDrawSurface7_Release(src_surface);
......
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