d3d8/tests: Skip tests if we can't create the D3D8 object.
This commit is contained in:
parent
522d836c00
commit
855ce5bd86
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue