diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-09-22 22:15:07 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-10-03 23:54:36 +0200 |
commit | 1c6c72caf1b3cc004c3bcbe65b5bef5c850f82f8 (patch) | |
tree | e79c6d4061fdf316b089137d56a3c583e143cfcb /core/os | |
parent | 1371a97acfb9263aaca7fa8642e95ba68534fa19 (diff) |
Rename `Engine.target_fps` and associated project setting to `max_fps`
This makes the setting easier to find, as research has found there are
numerous use cases to limiting FPS. This also improves documentation
related to the Engine property and project setting.
The project setting also works in projects exported in release mode,
so its location in the `debug/` section was misleading.
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/os.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 2bdede889f..72d68893f3 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -511,10 +511,10 @@ void OS::add_frame_delay(bool p_can_draw) { if (is_in_low_processor_usage_mode() || !p_can_draw) { dynamic_delay = get_low_processor_usage_mode_sleep_usec(); } - const int target_fps = Engine::get_singleton()->get_target_fps(); - if (target_fps > 0 && !Engine::get_singleton()->is_editor_hint()) { + const int max_fps = Engine::get_singleton()->get_max_fps(); + if (max_fps > 0 && !Engine::get_singleton()->is_editor_hint()) { // Override the low processor usage mode sleep delay if the target FPS is lower. - dynamic_delay = MAX(dynamic_delay, (uint64_t)(1000000 / target_fps)); + dynamic_delay = MAX(dynamic_delay, (uint64_t)(1000000 / max_fps)); } if (dynamic_delay > 0) { |