From e6d5fa43af49c3407af8229f893dbdd738c9d3dd Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 6 Sep 2023 11:22:18 +1000 Subject: [PATCH] D3D11Device: Fix crash when switching renderers --- src/util/d3d11_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/d3d11_device.cpp b/src/util/d3d11_device.cpp index a04f7ffd7..c096b1643 100644 --- a/src/util/d3d11_device.cpp +++ b/src/util/d3d11_device.cpp @@ -635,7 +635,7 @@ GPUDevice::AdapterAndModeList D3D11Device::StaticGetAdapterAndModeList() std::unique_lock lock(s_instance_mutex); // Device shouldn't be torn down since we have the lock. - if (g_gpu_device && g_gpu_device->GetRenderAPI() == RenderAPI::D3D12) + if (g_gpu_device && g_gpu_device->GetRenderAPI() == RenderAPI::D3D11) { GetAdapterAndModeList(&ret, D3D11Device::GetInstance().m_dxgi_factory.Get()); }