Fix: GHOST: Build error

Caused by aafef977fb
This commit is contained in:
Clément Foucault
2025-08-11 12:39:32 +02:00
parent aafef977fb
commit 856a2a9f87

View File

@@ -841,7 +841,8 @@ static void requireExtension(const vector<VkExtensionProperties> &extensions_ava
}
}
static GHOST_TSuccess selectPresentMode(VkPhysicalDevice device,
static GHOST_TSuccess selectPresentMode(const char *ghost_vsync_string,
VkPhysicalDevice device,
VkSurfaceKHR surface,
VkPresentModeKHR *r_presentMode)
{
@@ -850,7 +851,6 @@ static GHOST_TSuccess selectPresentMode(VkPhysicalDevice device,
vector<VkPresentModeKHR> presents(present_count);
vkGetPhysicalDeviceSurfacePresentModesKHR(device, surface, &present_count, presents.data());
const char *ghost_vsync_string = getEnvVarVsyncString();
if (ghost_vsync_string) {
bool vsync_off = atoi(ghost_vsync_string) == 0;
if (vsync_off) {
@@ -967,7 +967,7 @@ GHOST_TSuccess GHOST_ContextVK::recreateSwapchain(bool use_hdr_swapchain)
}
VkPresentModeKHR present_mode;
if (!selectPresentMode(physical_device, m_surface, &present_mode)) {
if (!selectPresentMode(getEnvVarVsyncString(), physical_device, m_surface, &present_mode)) {
return GHOST_kFailure;
}