diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-04 11:19:56 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-04 11:19:56 +0200 |
commit | 68765b8831a1fc56cf4d51ab2fdd844bfbcd9e97 (patch) | |
tree | a31d49269d5ab7cd249a3a12af244eb6acb0ffb9 /platform | |
parent | 1c6e8f7e6236b0606342fb5bb415f53b366c0bc6 (diff) | |
parent | 1c6c72caf1b3cc004c3bcbe65b5bef5c850f82f8 (diff) |
Merge pull request #66274 from Calinou/engine-rename-max-fps
Rename `Engine.target_fps` and associated project setting to `max_fps`
Diffstat (limited to 'platform')
-rw-r--r-- | platform/web/web_main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/web/web_main.cpp b/platform/web/web_main.cpp index 287fe48c4d..a76b98f4e9 100644 --- a/platform/web/web_main.cpp +++ b/platform/web/web_main.cpp @@ -77,14 +77,14 @@ void main_loop_callback() { return; // Skip frame. } - int target_fps = Engine::get_singleton()->get_target_fps(); - if (target_fps > 0) { + int max_fps = Engine::get_singleton()->get_max_fps(); + if (max_fps > 0) { if (current_ticks - target_ticks > 1000000) { // When the window loses focus, we stop getting updates and accumulate delay. // For this reason, if the difference is too big, we reset target ticks to the current ticks. target_ticks = current_ticks; } - target_ticks += (uint64_t)(1000000 / target_fps); + target_ticks += (uint64_t)(1000000 / max_fps); } if (os->main_loop_iterate()) { emscripten_cancel_main_loop(); // Cancel current loop and wait for cleanup_after_sync. |