mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 06:25:37 +00:00
D3DHostDisplay: Fix starting in exclusive fullscreen
This commit is contained in:
parent
2d4404c031
commit
29a5ac5d80
|
@ -354,15 +354,19 @@ bool D3D11HostDisplay::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))
|
||||||
|
{
|
||||||
|
m_window_info = {};
|
||||||
|
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,
|
||||||
bool threaded_presentation)
|
bool threaded_presentation)
|
||||||
{
|
{
|
||||||
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!CreateResources())
|
if (!CreateResources())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -255,15 +255,19 @@ 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))
|
||||||
|
{
|
||||||
|
m_window_info = {};
|
||||||
|
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,
|
||||||
bool threaded_presentation)
|
bool threaded_presentation)
|
||||||
{
|
{
|
||||||
if (m_window_info.type != WindowInfo::Type::Surfaceless && !CreateSwapChain(nullptr))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!CreateResources())
|
if (!CreateResources())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue