Explorar el Código

Removed redundant check for VK_SUCCESS

Fixes https://github.com/libsdl-org/SDL/issues/15157
Sam Lantinga hace 1 mes
padre
commit
7be5990089
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 2 - 4
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -10968,10 +10968,8 @@ static bool VULKAN_Submit(
             presentData->windowData->needsSwapchainRecreate = true;
             presentData->windowData->needsSurfaceRecreate = true;
         } else {
-            if (presentResult != VK_SUCCESS) {
-                VULKAN_INTERNAL_ReleaseCommandBuffer(vulkanCommandBuffer);
-                SDL_UnlockMutex(renderer->submitLock);
-            }
+            VULKAN_INTERNAL_ReleaseCommandBuffer(vulkanCommandBuffer);
+            SDL_UnlockMutex(renderer->submitLock);
 
             CHECK_VULKAN_ERROR_AND_RETURN(presentResult, vkQueuePresentKHR, false);
         }