diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-11-13 08:34:21 -0600 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-11-13 08:34:21 -0600 |
commit | 15d09a5767a3a148c76a1b721decf50a9c51cd30 (patch) | |
tree | 9e8139a67bc9aaa25b8cbc1c6690b9245e362008 /drivers | |
parent | 7cfd76200936ac306e0b5d5f49f9e24fc57a2e86 (diff) | |
parent | 4b94162320692770f68128581c6b99d517850421 (diff) | |
download | redot-engine-15d09a5767a3a148c76a1b721decf50a9c51cd30.tar.gz |
Merge pull request #99149 from mrsaturnsan/set_max_fps_fix
Fix max FPS initialization
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 6eecd850f5..a86f72e0b9 100644 --- a/drivers/vulkan/rendering_device_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp @@ -3032,13 +3032,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, |