Commit aa6517cf authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ddraw/tests: Test restoring attached surface for ddraw1.

parent d8812edc
......@@ -7166,11 +7166,12 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
IDirectDrawSurface *surface;
IDirectDrawSurface *surface, *back_buffer;
DDSURFACEDESC surface_desc;
HWND window1, window2;
IDirectDraw *ddraw;
ULONG refcount;
DDSCAPS caps;
HRESULT hr;
BOOL ret;
......@@ -7308,6 +7309,19 @@ static void test_lost_device(void)
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Restore(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(back_buffer);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
......
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