diff options
Diffstat (limited to 'core/config/engine.cpp')
-rw-r--r-- | core/config/engine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp index 124b5990a5..2735a1aa67 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -39,7 +39,7 @@ #include "core/redot_authors.gen.h" #include "core/variant/typed_array.h" #include "core/version.h" -#include "core/version_generated.gen.h" +#include "servers/rendering/rendering_device.h" void Engine::set_physics_ticks_per_second(int p_ips) { ERR_FAIL_COND_MSG(p_ips <= 0, "Engine iterations per second must be greater than 0."); @@ -72,6 +72,11 @@ double Engine::get_physics_jitter_fix() const { void Engine::set_max_fps(int p_fps) { _max_fps = p_fps > 0 ? p_fps : 0; + + RenderingDevice *rd = RenderingDevice::get_singleton(); + if (rd) { + rd->_set_max_fps(_max_fps); + } } int Engine::get_max_fps() const { |