mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-05 22:30:29 +00:00
GPU: Bail out of aquiring Vulkan swapchain if window is hidden
This commit is contained in:
parent
6d580d74f2
commit
c5edf4bd5b
1 changed files with 5 additions and 0 deletions
|
|
@ -9934,6 +9934,11 @@ static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
|
|||
SET_STRING_ERROR_AND_RETURN("Cannot acquire a swapchain texture from an unclaimed window!", false);
|
||||
}
|
||||
|
||||
if (window->flags & SDL_WINDOW_HIDDEN) {
|
||||
// Edge case, texture is filled in with NULL but not an error
|
||||
return true;
|
||||
}
|
||||
|
||||
// If window data marked as needing swapchain recreate, try to recreate
|
||||
if (windowData->needsSwapchainRecreate) {
|
||||
Uint32 recreateSwapchainResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue