diff options
author | Daniel Kinsman <danielkinsman@riseup.net> | 2024-08-06 11:47:25 +1000 |
---|---|---|
committer | Daniel Kinsman <danielkinsman@riseup.net> | 2024-09-04 09:47:26 +1000 |
commit | 5e04f0760aad19bed8ad10772c908a1438b28315 (patch) | |
tree | a093d8dcd250c8fc7d1084cc90143fdbd0ad1974 /editor/debugger | |
parent | e2dd56bea7a1aa13fe74fd6eac049e4cbde0434c (diff) | |
download | redot-engine-5e04f0760aad19bed8ad10772c908a1438b28315.tar.gz |
Add target fps editor setting to visual profiler
Use same max fps as project setting
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
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); |