d3d10core: Try to create a software adapter when no regular adapters are found as well.
This commit is contained in:
parent
5ef7a8c242
commit
bbc7b5ac20
|
@ -35,18 +35,19 @@ static ID3D10Device *create_device(void)
|
||||||
if (FAILED(hr)) goto cleanup;
|
if (FAILED(hr)) goto cleanup;
|
||||||
|
|
||||||
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter);
|
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter);
|
||||||
ok(SUCCEEDED(hr) ||
|
ok(SUCCEEDED(hr) || hr == DXGI_ERROR_NOT_FOUND, /* Some VMware and VirtualBox */
|
||||||
hr == DXGI_ERROR_NOT_FOUND, /* Some VMware and VirtualBox */
|
"EnumAdapters failed, hr %#x.\n", hr);
|
||||||
"EnumAdapters failed, hr %#x\n", hr);
|
if (SUCCEEDED(hr))
|
||||||
if (FAILED(hr)) goto cleanup;
|
{
|
||||||
|
hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device);
|
||||||
|
}
|
||||||
|
|
||||||
hr = D3D10CoreCreateDevice(factory, adapter, 0, NULL, &device);
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
HMODULE d3d10ref;
|
HMODULE d3d10ref;
|
||||||
|
|
||||||
trace("Failed to create a HW device, trying REF\n");
|
trace("Failed to create a HW device, trying REF\n");
|
||||||
IDXGIAdapter_Release(adapter);
|
if (adapter) IDXGIAdapter_Release(adapter);
|
||||||
adapter = NULL;
|
adapter = NULL;
|
||||||
|
|
||||||
d3d10ref = LoadLibraryA("d3d10ref.dll");
|
d3d10ref = LoadLibraryA("d3d10ref.dll");
|
||||||
|
|
Loading…
Reference in New Issue