Skip to content

Commit 92c0477

Browse files
committed
Fixed D3D11 mode being unavailable with DXVK
1 parent 7ad9f52 commit 92c0477

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Layers/xrRenderDX11/dx11HW.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ void CHW::DestroyD3D()
7575

7676
_SHOW_REF("refCount:m_pFactory", m_pFactory);
7777
_RELEASE(m_pFactory);
78+
79+
// Manually close and unload additional DLLs
80+
// To make it work with DXVK, etc.
81+
hD3D->Close();
82+
hDXGI->Close();
83+
if (auto hModule = GetModuleHandleA("d3d11.dll"))
84+
FreeLibrary(hModule);
85+
if (auto hModule = GetModuleHandleA("dxgi.dll"))
86+
FreeLibrary(hModule);
7887
}
7988

8089
void CHW::CreateDevice(SDL_Window* sdlWnd)

0 commit comments

Comments
 (0)