mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 08:55:45 -04:00
Android: Handle some possible surface loss cases
This commit is contained in:
@ -576,7 +576,7 @@ bool VulkanHostDisplay::DoneRenderContextCurrent()
|
||||
|
||||
bool VulkanHostDisplay::Render()
|
||||
{
|
||||
if (ShouldSkipDisplayingFrame())
|
||||
if (ShouldSkipDisplayingFrame() || !m_swap_chain)
|
||||
{
|
||||
if (ImGui::GetCurrentContext())
|
||||
ImGui::Render();
|
||||
@ -602,6 +602,7 @@ bool VulkanHostDisplay::Render()
|
||||
{
|
||||
Log_ErrorPrint("Failed to recreate surface after loss");
|
||||
g_vulkan_context->ExecuteCommandBuffer(false);
|
||||
m_swap_chain.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user