[dxgi] Use IWineDXGISwapChainFactory to create DXGI swap chains

This commit is contained in:
Philip Rebohle 2019-02-11 19:45:55 +01:00
parent 5ea8648cd9
commit 7ed91872b6
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 6 additions and 7 deletions

View File

@ -116,15 +116,14 @@ namespace dxvk {
if (!ppSwapChain || !pDesc || !hWnd || !pDevice)
return DXGI_ERROR_INVALID_CALL;
Com<IDXGIVkPresentDevice> dxvkDevice;
Com<IWineDXGISwapChainFactory> wineDevice;
if (SUCCEEDED(pDevice->QueryInterface(
__uuidof(IDXGIVkPresentDevice),
reinterpret_cast<void**>(&dxvkDevice)))) {
return CreateDxvkSwapChainForHwnd(
this, dxvkDevice.ptr(), hWnd, pDesc,
pFullscreenDesc, pRestrictToOutput,
ppSwapChain);
__uuidof(IWineDXGISwapChainFactory),
reinterpret_cast<void**>(&wineDevice)))) {
return wineDevice->CreateSwapChainForHwnd(
this, hWnd, pDesc, pFullscreenDesc,
pRestrictToOutput, ppSwapChain);
}
Logger::err("DXGI: CreateSwapChainForHwnd: Unsupported device type");