D3DHostDisplay: Fix starting in exclusive fullscreen

This commit is contained in:
Connor McLaughlin 2022-07-24 17:43:56 +10:00
parent 2d4404c031
commit 29a5ac5d80
2 changed files with 14 additions and 6 deletions

View File

@ -354,15 +354,19 @@ bool D3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view
}
m_window_info = wi;
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
{
m_window_info = {};
return false;
}
return true;
}
bool D3D11HostDisplay::InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation)
{
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
return false;
if (!CreateResources())
return false;

View File

@ -255,15 +255,19 @@ bool D3D12HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_view
}
m_window_info = wi;
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
{
m_window_info = {};
return false;
}
return true;
}
bool D3D12HostDisplay::InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation)
{
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
return false;
if (!CreateResources())
return false;