diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 6 | ||||
-rw-r--r-- | editor/editor_node.h | 2 | ||||
-rw-r--r-- | editor/find_in_files.cpp | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 891705da98..b4980fe074 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -562,9 +562,9 @@ void EditorNode::_notification(int p_what) { last_checked_version = editor_data.get_undo_redo().get_version(); } - // update the animation frame of the update spinner + // Update the animation frame of the update spinner. uint64_t frame = Engine::get_singleton()->get_frames_drawn(); - uint32_t tick = OS::get_singleton()->get_ticks_msec(); + uint64_t tick = OS::get_singleton()->get_ticks_msec(); if (frame != update_spinner_step_frame && (tick - update_spinner_step_msec) > (1000 / 8)) { update_spinner_step++; @@ -575,7 +575,7 @@ void EditorNode::_notification(int p_what) { update_spinner_step_msec = tick; update_spinner_step_frame = frame + 1; - // update the icon itself only when the spinner is visible + // Update the icon itself only when the spinner is visible. if (EditorSettings::get_singleton()->get("interface/editor/show_update_spinner")) { update_spinner->set_icon(gui_base->get_theme_icon("Progress" + itos(update_spinner_step + 1), SNAME("EditorIcons"))); } diff --git a/editor/editor_node.h b/editor/editor_node.h index c64bcc0460..03e5146d98 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -407,7 +407,7 @@ private: bool waiting_for_sources_changed; - uint32_t update_spinner_step_msec; + uint64_t update_spinner_step_msec; uint64_t update_spinner_step_frame; int update_spinner_step; diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 283496c0f1..6ed12c31ff 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -148,11 +148,11 @@ void FindInFiles::_process() { // This part can be moved to a thread if needed OS &os = *OS::get_singleton(); - float time_before = os.get_ticks_msec(); + uint64_t time_before = os.get_ticks_msec(); while (is_processing()) { _iterate(); - float elapsed = (os.get_ticks_msec() - time_before); - if (elapsed > 1000.0 / 120.0) { + uint64_t elapsed = (os.get_ticks_msec() - time_before); + if (elapsed > 8) { // Process again after waiting 8 ticks break; } } |