diff options
Diffstat (limited to 'editor/debugger')
-rw-r--r-- | editor/debugger/editor_visual_profiler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index 17977fcb29..56c9db44cd 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -103,6 +103,8 @@ void EditorVisualProfiler::clear() { variables->clear(); //activate->set_pressed(false); + graph_limit = 1000.0f / CLAMP(int(EDITOR_GET("debugger/profiler_target_fps")), 1, 1000); + updating_frame = true; cursor_metric_edit->set_min(0); cursor_metric_edit->set_max(0); @@ -812,6 +814,8 @@ EditorVisualProfiler::EditorVisualProfiler() { int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 10000); frame_metrics.resize(metric_size); + graph_limit = 1000.0f / CLAMP(int(EDITOR_GET("debugger/profiler_target_fps")), 1, 1000); + frame_delay = memnew(Timer); frame_delay->set_wait_time(0.1); frame_delay->set_one_shot(true); |