dxgi: Don't crash and just skip the tests if glX in not available.
This commit is contained in:
parent
ba3054b60e
commit
2392214427
|
@ -97,6 +97,12 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
|
||||||
|
|
||||||
EnterCriticalSection(&dxgi_cs);
|
EnterCriticalSection(&dxgi_cs);
|
||||||
object->wined3d = WineDirect3DCreate(10, (IUnknown *)object);
|
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);
|
object->adapter_count = IWineD3D_GetAdapterCount(object->wined3d);
|
||||||
LeaveCriticalSection(&dxgi_cs);
|
LeaveCriticalSection(&dxgi_cs);
|
||||||
|
|
|
@ -33,7 +33,6 @@ static IDXGIDevice *create_device(HMODULE d3d10core)
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void *)&factory);
|
hr = CreateDXGIFactory(&IID_IDXGIFactory, (void *)&factory);
|
||||||
ok(SUCCEEDED(hr), "CreateDXGIFactory failed, hr %#x\n", hr);
|
|
||||||
if (FAILED(hr)) goto cleanup;
|
if (FAILED(hr)) goto cleanup;
|
||||||
|
|
||||||
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter);
|
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter);
|
||||||
|
|
Loading…
Reference in New Issue