GPU: Bail out of aquiring Vulkan swapchain if window is hidden
(cherry picked from commit c5edf4bd5b)
This commit is contained in:
1 parent
544eb2c5a9
commit
f759e7ac59
1 file changed
+5
@@ -9934,6 +9934,11 @@ static bool VULKAN_INTERNAL_AcquireSwapchainTexture(
|
|||||||
SET_STRING_ERROR_AND_RETURN("Cannot acquire a swapchain texture from an unclaimed window!", false);
|
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 window data marked as needing swapchain recreate, try to recreate
|
||||||
if (windowData->needsSwapchainRecreate) {
|
if (windowData->needsSwapchainRecreate) {
|
||||||
Uint32 recreateSwapchainResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
|
Uint32 recreateSwapchainResult = VULKAN_INTERNAL_RecreateSwapchain(renderer, windowData);
|
||||||
|
|||||||
Reference in new issue
Block a user