Henri Verbeet : dxgi: Try to create a software adapter when no regular adapters are found as well .
Alexandre Julliard
julliard at winehq.org
Mon Oct 25 10:58:23 CDT 2010
Module: wine
Branch: master
Commit: 20043c0a46527e4e1b678be996f3c5629b142737
URL: http://source.winehq.org/git/wine.git/?a=commit;h=20043c0a46527e4e1b678be996f3c5629b142737
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Oct 25 12:33:42 2010 +0200
dxgi: Try to create a software adapter when no regular adapters are found as well.
---
dlls/dxgi/tests/device.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c
index 4d2ac14..ef86b34 100644
--- a/dlls/dxgi/tests/device.c
+++ b/dlls/dxgi/tests/device.c
@@ -36,18 +36,17 @@ static IDXGIDevice *create_device(HMODULE d3d10core)
if (FAILED(hr)) goto cleanup;
hr = IDXGIFactory_EnumAdapters(factory, 0, &adapter);
- ok(SUCCEEDED(hr) ||
- hr == DXGI_ERROR_NOT_FOUND, /* Some VMware and VirtualBox */
- "EnumAdapters failed, hr %#x\n", hr);
- if (FAILED(hr)) goto cleanup;
+ if (SUCCEEDED(hr))
+ {
+ hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device);
+ }
- hr = DXGID3D10CreateDevice(d3d10core, factory, adapter, 0, NULL, (void **)&device);
if (FAILED(hr))
{
HMODULE d3d10ref;
trace("Failed to create a HW device, trying REF\n");
- IDXGIAdapter_Release(adapter);
+ if (adapter) IDXGIAdapter_Release(adapter);
adapter = NULL;
d3d10ref = LoadLibraryA("d3d10ref.dll");
More information about the wine-cvs
mailing list