mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-11 19:10:55 +00:00
vulkan: Fix present mode fallback override
In overlay_CreateSwapchainKHR, if IsPresentModeSupported returns false (which it will when FIFO_RELAXED is not supported) it sets HUDElements.cur_present_mode to VK_PRESENT_MODE_FIFO_KHR but it does not update createInfo.presentMode. This can cause swapchain creation to fail since it's trying to use an unsupported present mode. This updates the createInfo's presentMode as well to prevent this.
This commit is contained in:
parent
4b45e2612f
commit
2e7e86feef
@ -1547,6 +1547,7 @@ static VkResult overlay_CreateSwapchainKHR(
|
||||
else {
|
||||
SPDLOG_DEBUG("Present mode is not supported: {}", HUDElements.presentModeMap[HUDElements.cur_present_mode]);
|
||||
HUDElements.cur_present_mode = VK_PRESENT_MODE_FIFO_KHR;
|
||||
createInfo.presentMode = VK_PRESENT_MODE_FIFO_KHR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user