From 60a739e3053c6d50602263ad9c4ba4944046165d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 9 Jul 2020 13:24:56 +1000 Subject: [PATCH] D3D11HostDisplay: Add __has_include check for dxgi1_5.h --- src/frontend-common/d3d11_host_display.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend-common/d3d11_host_display.cpp b/src/frontend-common/d3d11_host_display.cpp index 8753995a3..e8ea92a51 100644 --- a/src/frontend-common/d3d11_host_display.cpp +++ b/src/frontend-common/d3d11_host_display.cpp @@ -6,7 +6,9 @@ #include "display_ps.hlsl.h" #include "display_vs.hlsl.h" #include +#if defined(__has_include) && __has_include() #include +#endif #include #include Log_SetChannel(D3D11HostDisplay); @@ -258,6 +260,7 @@ bool D3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view } m_allow_tearing_supported = false; +#if defined(__has_include) && __has_include() ComPtr dxgi_factory5; hr = m_dxgi_factory.As(&dxgi_factory5); if (SUCCEEDED(hr)) @@ -268,6 +271,7 @@ bool D3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view if (SUCCEEDED(hr)) m_allow_tearing_supported = (allow_tearing_supported == TRUE); } +#endif m_window_info = wi; return true;