ddraw/tests: Get rid of some unused assignments.

This commit is contained in:
Henri Verbeet 2014-06-16 13:13:23 +02:00 committed by Alexandre Julliard
parent d8135b8243
commit b9bfcf2c2a
4 changed files with 29 additions and 37 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2012 Henri Verbeet for CodeWeavers * Copyright 2011-2014 Henri Verbeet for CodeWeavers
* Copyright 2012-2013 Stefan Dösinger for CodeWeavers * Copyright 2012-2013 Stefan Dösinger for CodeWeavers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -304,7 +304,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo
U2(surface_desc).dwZBufferBitDepth = z_depths[i]; U2(surface_desc).dwZBufferBitDepth = z_depths[i];
surface_desc.dwWidth = 640; surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480; surface_desc.dwHeight = 480;
if (FAILED(hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL))) if (FAILED(IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL)))
continue; continue;
hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); hr = IDirectDrawSurface_AddAttachedSurface(surface, ds);
@ -313,7 +313,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo
if (FAILED(hr)) if (FAILED(hr))
continue; continue;
if (SUCCEEDED(hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DHALDevice, (void **)&device))) if (SUCCEEDED(IDirectDrawSurface_QueryInterface(surface, &IID_IDirect3DHALDevice, (void **)&device)))
break; break;
IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds); IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds);
@ -3990,14 +3990,13 @@ static void test_primary_palette(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8))) if (FAILED(IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw_Release(ddraw); IDirectDraw_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
@ -5179,7 +5178,7 @@ static void test_palette_gdi(void)
refcount = IDirectDrawSurface_Release(surface); refcount = IDirectDrawSurface_Release(surface);
ok(!refcount, "Got unexpected refcount %u.\n", refcount); ok(!refcount, "Got unexpected refcount %u.\n", refcount);
if (FAILED(hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8))) if (FAILED(IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDrawPalette_Release(palette); IDirectDrawPalette_Release(palette);
@ -5351,14 +5350,13 @@ static void test_palette_alpha(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8))) if (FAILED(IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw_Release(ddraw); IDirectDraw_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2012 Henri Verbeet for CodeWeavers * Copyright 2011-2014 Henri Verbeet for CodeWeavers
* Copyright 2012-2014 Stefan Dösinger for CodeWeavers * Copyright 2012-2014 Stefan Dösinger for CodeWeavers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -236,7 +236,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c
U2(surface_desc).dwZBufferBitDepth = z_depths[i]; U2(surface_desc).dwZBufferBitDepth = z_depths[i];
surface_desc.dwWidth = 640; surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480; surface_desc.dwHeight = 480;
if (FAILED(hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL))) if (FAILED(IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL)))
continue; continue;
hr = IDirectDrawSurface_AddAttachedSurface(surface, ds); hr = IDirectDrawSurface_AddAttachedSurface(surface, ds);
@ -245,7 +245,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c
if (FAILED(hr)) if (FAILED(hr))
continue; continue;
if (SUCCEEDED(hr = IDirect3D2_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device))) if (SUCCEEDED(IDirect3D2_CreateDevice(d3d, &IID_IDirect3DHALDevice, surface, &device)))
break; break;
IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds); IDirectDrawSurface_DeleteAttachedSurface(surface, 0, ds);
@ -835,7 +835,7 @@ static void test_surface_interface_mismatch(void)
goto cleanup; goto cleanup;
} }
if (FAILED(hr = IDirectDraw2_QueryInterface(ddraw, &IID_IDirect3D2, (void **)&d3d))) if (FAILED(IDirectDraw2_QueryInterface(ddraw, &IID_IDirect3D2, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto cleanup; goto cleanup;
@ -3940,7 +3940,7 @@ static void test_rt_caps(void)
ok(!!z_depth, "Failed to get device z depth.\n"); ok(!!z_depth, "Failed to get device z depth.\n");
IDirect3DDevice2_Release(device); IDirect3DDevice2_Release(device);
if (FAILED(hr = IDirectDraw2_QueryInterface(ddraw, &IID_IDirect3D2, (void **)&d3d))) if (FAILED(IDirectDraw2_QueryInterface(ddraw, &IID_IDirect3D2, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto done; goto done;
@ -5066,14 +5066,13 @@ static void test_primary_palette(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw2_Release(ddraw); IDirectDraw2_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
@ -6247,7 +6246,7 @@ static void test_palette_gdi(void)
refcount = IDirectDrawSurface_Release(surface); refcount = IDirectDrawSurface_Release(surface);
ok(!refcount, "Got unexpected refcount %u.\n", refcount); ok(!refcount, "Got unexpected refcount %u.\n", refcount);
if (FAILED(hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDrawPalette_Release(palette); IDirectDrawPalette_Release(palette);
@ -6420,14 +6419,13 @@ static void test_palette_alpha(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw2_Release(ddraw); IDirectDraw2_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2011-2012 Henri Verbeet for CodeWeavers * Copyright 2011-2014 Henri Verbeet for CodeWeavers
* Copyright 2012-2014 Stefan Dösinger for CodeWeavers * Copyright 2012-2014 Stefan Dösinger for CodeWeavers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -1031,7 +1031,7 @@ static void test_surface_interface_mismatch(void)
hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3);
ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#x.\n", hr);
if (FAILED(hr = IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d))) if (FAILED(IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto cleanup; goto cleanup;
@ -4689,7 +4689,7 @@ static void test_rt_caps(void)
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
if (FAILED(hr = IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d))) if (FAILED(IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto done; goto done;
@ -5052,7 +5052,7 @@ static void test_surface_lock(void)
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
if (FAILED(hr = IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d))) if (FAILED(IDirectDraw4_QueryInterface(ddraw, &IID_IDirect3D3, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto done; goto done;
@ -5847,14 +5847,13 @@ static void test_primary_palette(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw4_Release(ddraw); IDirectDraw4_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
@ -7245,7 +7244,7 @@ static void test_palette_gdi(void)
refcount = IDirectDrawSurface4_Release(surface); refcount = IDirectDrawSurface4_Release(surface);
ok(!refcount, "Got unexpected refcount %u.\n", refcount); ok(!refcount, "Got unexpected refcount %u.\n", refcount);
if (FAILED(hr = IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDrawPalette_Release(palette); IDirectDrawPalette_Release(palette);
@ -7417,14 +7416,13 @@ static void test_palette_alpha(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw4_Release(ddraw); IDirectDraw4_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);

View File

@ -1,6 +1,6 @@
/* /*
* Copyright 2006, 2012-2014 Stefan Dösinger for CodeWeavers * Copyright 2006, 2012-2014 Stefan Dösinger for CodeWeavers
* Copyright 2011 Henri Verbeet for CodeWeavers * Copyright 2011-2014 Henri Verbeet for CodeWeavers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -948,7 +948,7 @@ static void test_surface_interface_mismatch(void)
hr = IDirectDrawSurface7_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3); hr = IDirectDrawSurface7_QueryInterface(surface, &IID_IDirectDrawSurface3, (void **)&surface3);
ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to QI IDirectDrawSurface3, hr %#x.\n", hr);
if (FAILED(hr = IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d))) if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto cleanup; goto cleanup;
@ -4460,7 +4460,7 @@ static void test_rt_caps(void)
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
if (FAILED(hr = IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d))) if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto done; goto done;
@ -4868,7 +4868,7 @@ static void test_surface_lock(void)
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
if (FAILED(hr = IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d))) if (FAILED(IDirectDraw7_QueryInterface(ddraw, &IID_IDirect3D7, (void **)&d3d)))
{ {
skip("D3D interface is not available, skipping test.\n"); skip("D3D interface is not available, skipping test.\n");
goto done; goto done;
@ -5688,14 +5688,13 @@ static void test_primary_palette(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw7_Release(ddraw); IDirectDraw7_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
@ -5823,7 +5822,7 @@ static void test_surface_attachment(void)
U2(surface_desc).dwMipMapCount = 3; U2(surface_desc).dwMipMapCount = 3;
surface_desc.dwWidth = 128; surface_desc.dwWidth = 128;
surface_desc.dwHeight = 128; surface_desc.dwHeight = 128;
if (FAILED(hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface1, NULL))) if (FAILED(IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface1, NULL)))
{ {
skip("Failed to create a texture, skipping tests.\n"); skip("Failed to create a texture, skipping tests.\n");
IDirectDraw7_Release(ddraw); IDirectDraw7_Release(ddraw);
@ -6967,7 +6966,7 @@ static void test_palette_gdi(void)
refcount = IDirectDrawSurface7_Release(surface); refcount = IDirectDrawSurface7_Release(surface);
ok(!refcount, "Got unexpected refcount %u.\n", refcount); ok(!refcount, "Got unexpected refcount %u.\n", refcount);
if (FAILED(hr = IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDrawPalette_Release(palette); IDirectDrawPalette_Release(palette);
@ -7139,14 +7138,13 @@ static void test_palette_alpha(void)
0, 0, 640, 480, 0, 0, 0, 0); 0, 0, 640, 480, 0, 0, 0, 0);
ddraw = create_ddraw(); ddraw = create_ddraw();
ok(!!ddraw, "Failed to create a ddraw object.\n"); ok(!!ddraw, "Failed to create a ddraw object.\n");
if (FAILED(hr = IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0))) if (FAILED(IDirectDraw7_SetDisplayMode(ddraw, 640, 480, 8, 0, 0)))
{ {
win_skip("Failed to set 8 bpp display mode, skipping test.\n"); win_skip("Failed to set 8 bpp display mode, skipping test.\n");
IDirectDraw7_Release(ddraw); IDirectDraw7_Release(ddraw);
DestroyWindow(window); DestroyWindow(window);
return; return;
} }
ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);