mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
Add target fps editor setting to visual profiler
Use same max fps as project setting Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user