Commit f166b298 authored by Robin Kertels's avatar Robin Kertels Committed by Alexandre Julliard

d3d9/tests: Skip desktop window tests if device creation fails.

parent 47be32f3
...@@ -26438,6 +26438,8 @@ static void test_desktop_window(void) ...@@ -26438,6 +26438,8 @@ static void test_desktop_window(void)
device = create_device(d3d, GetDesktopWindow(), GetDesktopWindow(), TRUE); device = create_device(d3d, GetDesktopWindow(), GetDesktopWindow(), TRUE);
ok(!!device, "Failed to create a D3D device.\n"); ok(!!device, "Failed to create a D3D device.\n");
if (device)
{
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr); ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = getPixelColor(device, 1, 1); color = getPixelColor(device, 1, 1);
...@@ -26448,6 +26450,11 @@ static void test_desktop_window(void) ...@@ -26448,6 +26450,11 @@ static void test_desktop_window(void)
refcount = IDirect3DDevice9_Release(device); refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount); ok(!refcount, "Device has %lu references left.\n", refcount);
}
else
{
skip("Failed to create a D3D device for the desktop window, skipping tests.\n");
}
/* test device with NULL HWND */ /* test device with NULL HWND */
device = create_device(d3d, NULL, NULL, TRUE); device = create_device(d3d, NULL, NULL, TRUE);
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