Commit c1cc17d8 authored by Louis Lenders's avatar Louis Lenders Committed by Alexandre Julliard

d3d9: Fix failing tests on windows, when no 3d hardware acceleration is available.

parent d46d7d13
......@@ -735,8 +735,12 @@ static void test_reset(void)
hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice );
ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
if (FAILED(hr)) goto cleanup;
if(FAILED(hr))
{
trace("could not create device, IDirect3D9_CreateDevice returned %#x\n", hr);
goto cleanup;
}
width = GetSystemMetrics(SM_CXSCREEN);
height = GetSystemMetrics(SM_CYSCREEN);
......
......@@ -55,7 +55,12 @@ static IDirect3DDevice9 *init_d3d9(void)
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
hres = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr);
ok(hres == D3D_OK, "IDirect3D_CreateDevice returned: 0x%x\n", hres);
if(FAILED(hres))
{
trace("could not create device, IDirect3D9_CreateDevice returned %#x\n", hres);
return NULL;
}
return device_ptr;
}
......
......@@ -54,7 +54,12 @@ static IDirect3DDevice9 *init_d3d9(HMODULE d3d9_handle)
hr = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr);
ok(SUCCEEDED(hr), "IDirect3D_CreateDevice returned %#x\n", hr);
if(FAILED(hr))
{
trace("could not create device, IDirect3D9_CreateDevice returned %#x\n", hr);
return NULL;
}
return device_ptr;
}
......
......@@ -53,7 +53,12 @@ static IDirect3DDevice9 *init_d3d9(HMODULE d3d9_handle)
hr = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr);
ok(SUCCEEDED(hr), "IDirect3D_CreateDevice returned %#x\n", hr);
if(FAILED(hr))
{
trace("could not create device, IDirect3D9_CreateDevice returned %#x\n", hr);
return NULL;
}
return device_ptr;
}
......
......@@ -60,7 +60,12 @@ static IDirect3DDevice9 *init_d3d9(void)
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
hres = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr);
ok(hres == D3D_OK, "IDirect3D_CreateDevice returned: 0x%x\n", hres);
if(FAILED(hres))
{
trace("could not create device, IDirect3D9_CreateDevice returned %#x\n", hres);
return NULL;
}
return device_ptr;
}
......
......@@ -53,7 +53,12 @@ static IDirect3DDevice9 *init_d3d9(HMODULE d3d9_handle)
hr = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr);
ok(SUCCEEDED(hr), "IDirect3D_CreateDevice returned %#x\n", hr);
if(FAILED(hr))
{
trace("could not create device, IDirect3D9_CreateDevice returned %#x\n", hr);
return NULL;
}
return device_ptr;
}
......
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