diff options
author | mrsaturnsan <32889818+mrsaturnsan@users.noreply.github.com> | 2024-11-12 16:15:34 -0600 |
---|---|---|
committer | mrsaturnsan <mrsaturnsan@gmail.com> | 2024-11-12 21:10:27 -0600 |
commit | 4b94162320692770f68128581c6b99d517850421 (patch) | |
tree | 3bd3005241585ec5f397402c2bdad25f2994504a /drivers | |
parent | ef8d981267702de38ffc24136f9d823d31781c60 (diff) | |
download | redot-engine-4b94162320692770f68128581c6b99d517850421.tar.gz |
Fix max FPS initialization
Remove unnecessary get_max_fps
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vulkan/rendering_device_driver_vulkan.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp index f9f1168a97..6179ba1407 100644 --- a/drivers/vulkan/rendering_device_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp @@ -3004,13 +3004,10 @@ Error RenderingDeviceDriverVulkan::swap_chain_resize(CommandQueueID p_cmd_queue, #if defined(SWAPPY_FRAME_PACING_ENABLED) if (swappy_frame_pacer_enable) { - const double max_fps = Engine::get_singleton()->get_max_fps(); - const uint64_t max_time = max_fps > 0 ? uint64_t((1000.0 * 1000.0 * 1000.0) / max_fps) : 0; - SwappyVk_initAndGetRefreshCycleDuration(get_jni_env(), static_cast<OS_Android *>(OS::get_singleton())->get_godot_java()->get_activity(), physical_device, vk_device, swap_chain->vk_swapchain, &swap_chain->refresh_duration); SwappyVk_setWindow(vk_device, swap_chain->vk_swapchain, static_cast<OS_Android *>(OS::get_singleton())->get_native_window()); - SwappyVk_setSwapIntervalNS(vk_device, swap_chain->vk_swapchain, MAX(swap_chain->refresh_duration, max_time)); + SwappyVk_setSwapIntervalNS(vk_device, swap_chain->vk_swapchain, swap_chain->refresh_duration); enum SwappyModes { PIPELINE_FORCED_ON, |