mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
SDL: Avoid destroying the surface on resize.
This commit is contained in:
parent
697c3b8b36
commit
49d9caeb0d
2 changed files with 7 additions and 2 deletions
|
@ -1083,6 +1083,13 @@ void VulkanContext::PerformPendingDeletes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VulkanContext::DestroyDevice() {
|
void VulkanContext::DestroyDevice() {
|
||||||
|
if (swapchain_) {
|
||||||
|
ELOG("DestroyDevice: Swapchain should have been destroyed.");
|
||||||
|
}
|
||||||
|
if (surface_) {
|
||||||
|
ELOG("DestroyDevice: Surface should have been destroyed.");
|
||||||
|
}
|
||||||
|
|
||||||
ILOG("VulkanContext::DestroyDevice (performing deletes)");
|
ILOG("VulkanContext::DestroyDevice (performing deletes)");
|
||||||
PerformPendingDeletes();
|
PerformPendingDeletes();
|
||||||
|
|
||||||
|
|
|
@ -144,9 +144,7 @@ void SDLVulkanGraphicsContext::Shutdown() {
|
||||||
void SDLVulkanGraphicsContext::Resize() {
|
void SDLVulkanGraphicsContext::Resize() {
|
||||||
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, vulkan_->GetBackbufferWidth(), vulkan_->GetBackbufferHeight());
|
draw_->HandleEvent(Draw::Event::LOST_BACKBUFFER, vulkan_->GetBackbufferWidth(), vulkan_->GetBackbufferHeight());
|
||||||
vulkan_->DestroySwapchain();
|
vulkan_->DestroySwapchain();
|
||||||
vulkan_->DestroySurface();
|
|
||||||
vulkan_->UpdateFlags(FlagsFromConfig());
|
vulkan_->UpdateFlags(FlagsFromConfig());
|
||||||
vulkan_->ReinitSurface();
|
|
||||||
vulkan_->InitSwapchain();
|
vulkan_->InitSwapchain();
|
||||||
draw_->HandleEvent(Draw::Event::GOT_BACKBUFFER, vulkan_->GetBackbufferWidth(), vulkan_->GetBackbufferHeight());
|
draw_->HandleEvent(Draw::Event::GOT_BACKBUFFER, vulkan_->GetBackbufferWidth(), vulkan_->GetBackbufferHeight());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue