Direct2D QPA: Fix DXGI Factory discovery magic

On some Intel configurations the current DXGI discovery breaks. Fix this
by adhering to Microsoft's guidelines for discovery of the DXGI factory:

http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx

Not querying the adapter directly as in the code snippet on the site above
seems to have been a typo originally.

Change-Id: Ibd7546462cdab7e5ad03db9abc16fe1615b631f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This commit is contained in:
Louai Al-Khanji 2014-05-05 09:26:31 +03:00 committed by The Qt Project
parent ad8efdbc0c
commit 1fdd765ae8

View File

@ -99,7 +99,7 @@ public:
return false;
}
hr = dxgiDevice->GetParent(IID_PPV_ARGS(&dxgiAdapter));
hr = dxgiDevice->GetAdapter(&dxgiAdapter);
if (FAILED(hr)) {
qWarning("%s: Failed to probe DXGI Device for parent DXGI Adapter: %#x", __FUNCTION__, hr);
return false;