From 7ed91872b60523e1ac6056b98b823240e712b5b0 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 11 Feb 2019 19:45:55 +0100 Subject: [PATCH] [dxgi] Use IWineDXGISwapChainFactory to create DXGI swap chains --- src/dxgi/dxgi_factory.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dxgi/dxgi_factory.cpp b/src/dxgi/dxgi_factory.cpp index 39bf57044..43c0b0439 100644 --- a/src/dxgi/dxgi_factory.cpp +++ b/src/dxgi/dxgi_factory.cpp @@ -116,15 +116,14 @@ namespace dxvk { if (!ppSwapChain || !pDesc || !hWnd || !pDevice) return DXGI_ERROR_INVALID_CALL; - Com dxvkDevice; + Com wineDevice; if (SUCCEEDED(pDevice->QueryInterface( - __uuidof(IDXGIVkPresentDevice), - reinterpret_cast(&dxvkDevice)))) { - return CreateDxvkSwapChainForHwnd( - this, dxvkDevice.ptr(), hWnd, pDesc, - pFullscreenDesc, pRestrictToOutput, - ppSwapChain); + __uuidof(IWineDXGISwapChainFactory), + reinterpret_cast(&wineDevice)))) { + return wineDevice->CreateSwapChainForHwnd( + this, hWnd, pDesc, pFullscreenDesc, + pRestrictToOutput, ppSwapChain); } Logger::err("DXGI: CreateSwapChainForHwnd: Unsupported device type");