Remove unnecessary comparison

It is not possible for swapchainPresentMode to ever be VK_PRESENT_MODE_MAILBOX_KHR given the break in the above if block
This commit is contained in:
Connor Haskins 2020-12-20 01:17:40 -08:00 committed by GitHub
parent 846413cc4b
commit 750a37f633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,7 +272,7 @@ void VulkanSwapChain::create(uint32_t *width, uint32_t *height, bool vsync)
swapchainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR; swapchainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR;
break; break;
} }
if ((swapchainPresentMode != VK_PRESENT_MODE_MAILBOX_KHR) && (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR)) if (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR)
{ {
swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR;
} }