Commit 855ce5bd authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

d3d8/tests: Skip tests if we can't create the D3D8 object.

parent 522d836c
......@@ -1365,6 +1365,15 @@ START_TEST(device)
ok(pDirect3DCreate8 != NULL, "Failed to get address of Direct3DCreate8\n");
if (pDirect3DCreate8)
{
IDirect3D8 *d3d8;
d3d8 = pDirect3DCreate8( D3D_SDK_VERSION );
if(!d3d8)
{
skip("could not create D3D8\n");
return;
}
IDirect3D8_Release(d3d8);
test_display_modes();
test_shader_versions();
test_swapchain();
......
......@@ -44,8 +44,11 @@ static IDirect3DDevice8 *init_d3d8(HMODULE d3d8_handle)
if (!d3d8_create) return NULL;
d3d8_ptr = d3d8_create(D3D_SDK_VERSION);
ok(d3d8_ptr != NULL, "Failed to create IDirect3D8 object\n");
if (!d3d8_ptr) return NULL;
if (!d3d8_ptr)
{
skip("could not create D3D8\n");
return NULL;
}
IDirect3D8_GetAdapterDisplayMode(d3d8_ptr, D3DADAPTER_DEFAULT, &d3ddm );
ZeroMemory(&present_parameters, sizeof(present_parameters));
......
......@@ -44,8 +44,11 @@ static IDirect3DDevice8 *init_d3d8(HMODULE d3d8_handle)
if (!d3d8_create) return NULL;
d3d8_ptr = d3d8_create(D3D_SDK_VERSION);
ok(d3d8_ptr != NULL, "Failed to create IDirect3D8 object\n");
if (!d3d8_ptr) return NULL;
if (!d3d8_ptr)
{
skip("could not create D3D8\n");
return NULL;
}
IDirect3D8_GetAdapterDisplayMode(d3d8_ptr, D3DADAPTER_DEFAULT, &d3ddm );
ZeroMemory(&present_parameters, sizeof(present_parameters));
......
......@@ -117,8 +117,11 @@ static IDirect3DDevice8 *init_d3d8(void)
if (!d3d8_create) return NULL;
d3d8_ptr = d3d8_create(D3D_SDK_VERSION);
ok(d3d8_ptr != NULL, "Failed to create IDirect3D8 object\n");
if (!d3d8_ptr) return NULL;
if (!d3d8_ptr)
{
skip("could not create D3D8\n");
return NULL;
}
ZeroMemory(&present_parameters, sizeof(present_parameters));
present_parameters.Windowed = FALSE;
......
......@@ -44,8 +44,11 @@ static IDirect3DDevice8 *init_d3d8(HMODULE d3d8_handle)
if (!d3d8_create) return NULL;
d3d8_ptr = d3d8_create(D3D_SDK_VERSION);
ok(d3d8_ptr != NULL, "Failed to create IDirect3D8 object\n");
if (!d3d8_ptr) return NULL;
if (!d3d8_ptr)
{
skip("could not create D3D8\n");
return NULL;
}
IDirect3D8_GetAdapterDisplayMode(d3d8_ptr, D3DADAPTER_DEFAULT, &d3ddm );
ZeroMemory(&present_parameters, sizeof(present_parameters));
......
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