@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user