From 2c4fce3f0dc5b01e6fccac50b16f317bfc43c3e8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 4 Jul 2020 17:37:50 +1000 Subject: [PATCH] D3D11HostDisplay: Don't create swap chain for headless --- src/frontend-common/d3d11_host_display.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend-common/d3d11_host_display.cpp b/src/frontend-common/d3d11_host_display.cpp index 269d35fd4..5b2d82349 100644 --- a/src/frontend-common/d3d11_host_display.cpp +++ b/src/frontend-common/d3d11_host_display.cpp @@ -271,8 +271,11 @@ bool D3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view bool D3D11HostDisplay::InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device) { - if (!CreateSwapChain()) + if (m_window_info.type != WindowInfo::Type::Surfaceless && m_window_info.type != WindowInfo::Type::Libretro && + !CreateSwapChain()) + { return false; + } if (!CreateResources()) return false;