ddraw: Reject flips of surfaces with themselves.

This commit is contained in:
Henri Verbeet 2013-12-04 09:49:33 +01:00 committed by Alexandre Julliard
parent 3b6d06e33c
commit ab8d59c29d
5 changed files with 5 additions and 5 deletions

View File

@ -1197,7 +1197,7 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
TRACE("iface %p, dst %p, flags %#x.\n", iface, DestOverride, Flags);
if (!(surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER | DDSCAPS_OVERLAY)))
if (DestOverride == iface || !(surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER | DDSCAPS_OVERLAY)))
return DDERR_NOTFLIPPABLE;
wined3d_mutex_lock();

View File

@ -3623,7 +3623,7 @@ static void test_flip(void)
IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface_Flip(primary, primary, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer2, NULL, DDFLIP_WAIT);

View File

@ -4304,7 +4304,7 @@ static void test_flip(void)
IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface_Flip(primary, primary, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer2, NULL, DDFLIP_WAIT);

View File

@ -4908,7 +4908,7 @@ static void test_flip(void)
IDirectDrawSurface4_Release(surface);
hr = IDirectDrawSurface4_Flip(primary, primary, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(backbuffer2, NULL, DDFLIP_WAIT);

View File

@ -4795,7 +4795,7 @@ static void test_flip(void)
IDirectDrawSurface7_Release(surface);
hr = IDirectDrawSurface7_Flip(primary, primary, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(backbuffer2, NULL, DDFLIP_WAIT);