ddraw: Check for a lost surface in ddraw_surface7_Flip().
This commit is contained in:
parent
881219354f
commit
8ebc82cd8d
|
@ -1227,6 +1227,9 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
|
|||
if (src == iface || !(dst_impl->surface_desc.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER | DDSCAPS_OVERLAY)))
|
||||
return DDERR_NOTFLIPPABLE;
|
||||
|
||||
if (IDirectDrawSurface7_IsLost(iface) == DDERR_SURFACELOST)
|
||||
return DDERR_SURFACELOST;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
tmp = dst_impl->wined3d_surface;
|
||||
|
|
|
@ -6610,7 +6610,7 @@ static void test_lost_device(void)
|
|||
hr = IDirectDrawSurface_IsLost(surface);
|
||||
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Trying to restore the primary will crash, probably because flippable
|
||||
* surfaces can't exist in DDSCL_NORMAL. */
|
||||
|
|
|
@ -7675,7 +7675,7 @@ static void test_lost_device(void)
|
|||
hr = IDirectDrawSurface4_IsLost(surface);
|
||||
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Trying to restore the primary will crash, probably because flippable
|
||||
* surfaces can't exist in DDSCL_NORMAL. */
|
||||
|
|
|
@ -7397,7 +7397,7 @@ static void test_lost_device(void)
|
|||
hr = IDirectDrawSurface7_IsLost(surface);
|
||||
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
|
||||
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
/* Trying to restore the primary will crash, probably because flippable
|
||||
* surfaces can't exist in DDSCL_NORMAL. */
|
||||
|
|
Loading…
Reference in New Issue