ddraw: Return the correct error in ddraw_surface7_Flip() when the surface is not flippable.
This commit is contained in:
parent
66c71baefe
commit
e780ee581d
|
@ -1197,10 +1197,8 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
|
|||
|
||||
TRACE("iface %p, dst %p, flags %#x.\n", iface, DestOverride, Flags);
|
||||
|
||||
/* Flip has to be called from a front buffer
|
||||
* What about overlay surfaces, AFAIK they can flip too? */
|
||||
if (!(surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER | DDSCAPS_OVERLAY)))
|
||||
return DDERR_INVALIDOBJECT; /* Unchecked */
|
||||
return DDERR_NOTFLIPPABLE;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
|
|
|
@ -3625,11 +3625,11 @@ static void test_flip(void)
|
|||
hr = IDirectDrawSurface_Flip(primary, primary, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface_Flip(backbuffer1, NULL, 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(backbuffer2, NULL, 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(backbuffer3, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&fx, 0, sizeof(fx));
|
||||
fx.dwSize = sizeof(fx);
|
||||
|
|
|
@ -4306,11 +4306,11 @@ static void test_flip(void)
|
|||
hr = IDirectDrawSurface_Flip(primary, primary, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface_Flip(backbuffer1, NULL, 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(backbuffer2, NULL, 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(backbuffer3, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&fx, 0, sizeof(fx));
|
||||
fx.dwSize = sizeof(fx);
|
||||
|
|
|
@ -4910,11 +4910,11 @@ static void test_flip(void)
|
|||
hr = IDirectDrawSurface4_Flip(primary, primary, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface4_Flip(backbuffer1, NULL, 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(backbuffer2, NULL, 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(backbuffer3, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&fx, 0, sizeof(fx));
|
||||
fx.dwSize = sizeof(fx);
|
||||
|
|
|
@ -4797,11 +4797,11 @@ static void test_flip(void)
|
|||
hr = IDirectDrawSurface7_Flip(primary, primary, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface7_Flip(backbuffer1, NULL, 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(backbuffer2, NULL, 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(backbuffer3, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
memset(&fx, 0, sizeof(fx));
|
||||
fx.dwSize = sizeof(fx);
|
||||
|
|
Loading…
Reference in New Issue