Commit 23922144 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

dxgi: Don't crash and just skip the tests if glX in not available.

parent ba3054b6
......@@ -97,6 +97,12 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
EnterCriticalSection(&dxgi_cs);
object->wined3d = WineDirect3DCreate(10, (IUnknown *)object);
if(!object->wined3d)
{
hr = DXGI_ERROR_UNSUPPORTED;
LeaveCriticalSection(&dxgi_cs);
goto fail;
}
object->adapter_count = IWineD3D_GetAdapterCount(object->wined3d);
LeaveCriticalSection(&dxgi_cs);
......
......@@ -33,7 +33,6 @@ static IDXGIDevice *create_device(HMODULE d3d10core)
HRESULT hr;
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void *)&factory);
ok(SUCCEEDED(hr), "CreateDXGIFactory failed, hr %#x\n", hr);
if (FAILED(hr)) goto cleanup;
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter);
......
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