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