ddraw: Reject flips of surfaces with themselves.
This commit is contained in:
parent
3b6d06e33c
commit
ab8d59c29d
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue