HostDisplay: Create swap chain in CreateRenderDevice() for D3D

Fixes starting in exclusive fullscreen mode in Qt.
This commit is contained in:
Connor McLaughlin 2022-06-05 02:22:51 +10:00 committed by refractionpcsx2
parent ca3833e71b
commit a05a655037
2 changed files with 8 additions and 6 deletions

View File

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

View File

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