ddraw/tests: Better clean up when skipping the primary palette tests.

This commit is contained in:
Francois Gouget 2014-02-17 17:44:56 +01:00 committed by Alexandre Julliard
parent 8b2938a23e
commit 4afe73ff39
3 changed files with 7 additions and 4 deletions

View File

@ -4080,7 +4080,8 @@ static void test_primary_palette(void)
hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8);
if (hr == E_NOTIMPL)
{
win_skip("8bpp display mode is not supported\n");
win_skip("changing display mode is not supported (8bpp)\n");
IDirectDraw_Release(ddraw);
DestroyWindow(window);
return;
}

View File

@ -5177,7 +5177,8 @@ static void test_primary_palette(void)
hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0);
if (hr == E_NOTIMPL)
{
win_skip("8bpp display mode is not supported\n");
win_skip("changing display mode is not supported (8bpp)\n");
IDirectDraw2_Release(ddraw);
DestroyWindow(window);
return;
}

View File

@ -5771,13 +5771,14 @@ static void test_primary_palette(void)
window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
0, 0, 640, 480, 0, 0, 0, 0);
hr = IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0);
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
if (hr == E_NOTIMPL)
{
win_skip("8bpp display mode is not supported\n");
win_skip("changing display mode is not supported (8bpp)\n");
IDirectDraw4_Release(ddraw);
DestroyWindow(window);
return;
}
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);