VulkanHostDisplay: Don't choke when we lose the surface

This commit is contained in:
Connor McLaughlin 2020-09-13 14:37:00 +10:00
parent 26dff586f3
commit a053f389bd

View file

@ -118,7 +118,12 @@ void* VulkanHostDisplay::GetRenderContext() const
bool VulkanHostDisplay::ChangeRenderWindow(const WindowInfo& new_wi)
{
Assert(!m_swap_chain);
if (new_wi.type == WindowInfo::Type::Surfaceless)
{
g_vulkan_context->ExecuteCommandBuffer(true);
m_swap_chain.reset();
return true;
}
WindowInfo wi_copy(new_wi);
VkSurfaceKHR surface = Vulkan::SwapChain::CreateVulkanSurface(g_vulkan_context->GetVulkanInstance(), wi_copy);