diff options
Diffstat (limited to 'core/config/engine.cpp')
-rw-r--r-- | core/config/engine.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp index cf9697be07..7aa5f4d06d 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -48,6 +48,15 @@ int Engine::get_physics_ticks_per_second() const { return ips; } +void Engine::set_max_physics_steps_per_frame(int p_max_physics_steps) { + ERR_FAIL_COND_MSG(p_max_physics_steps <= 0, "Maximum number of physics steps per frame must be greater than 0."); + max_physics_steps_per_frame = p_max_physics_steps; +} + +int Engine::get_max_physics_steps_per_frame() const { + return max_physics_steps_per_frame; +} + void Engine::set_physics_jitter_fix(double p_threshold) { if (p_threshold < 0) { p_threshold = 0; @@ -59,12 +68,12 @@ double Engine::get_physics_jitter_fix() const { return physics_jitter_fix; } -void Engine::set_target_fps(int p_fps) { - _target_fps = p_fps > 0 ? p_fps : 0; +void Engine::set_max_fps(int p_fps) { + _max_fps = p_fps > 0 ? p_fps : 0; } -int Engine::get_target_fps() const { - return _target_fps; +int Engine::get_max_fps() const { + return _max_fps; } uint64_t Engine::get_frames_drawn() { |