summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authormrsaturnsan <32889818+mrsaturnsan@users.noreply.github.com>2024-11-12 16:15:34 -0600
committermrsaturnsan <mrsaturnsan@gmail.com>2024-11-12 21:10:27 -0600
commit4b94162320692770f68128581c6b99d517850421 (patch)
tree3bd3005241585ec5f397402c2bdad25f2994504a /drivers
parentef8d981267702de38ffc24136f9d823d31781c60 (diff)
downloadredot-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.cpp5
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,