Destroy backbuffer when shutting down vulkan conext.

This commit is contained in:
Stuart Kenny 2021-11-25 15:32:44 +00:00
parent fb755bac13
commit d609a7c8bf

View File

@ -143,18 +143,23 @@ void LibretroVulkanContext::CreateDrawContext() {
}
void LibretroVulkanContext::Shutdown() {
LibretroHWRenderContext::Shutdown();
if (!vk) {
return;
}
if (draw_)
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, vk->GetBackbufferWidth(), vk->GetBackbufferHeight());
delete draw_;
draw_ = nullptr;
vk->WaitUntilQueueIdle();
vk->DestroySwapchain();
vk->DestroySurface();
vk->DestroyDevice();
vk->DestroyInstance();
delete vk;
vk = nullptr;