Merge pull request #54809 from Calinou/editor-frametime-display-more-decimals-3.x
Display 2 decimals instead of 1 in editor frametime labels (3.x)
This commit is contained in:
commit
403ca51dd2
2 changed files with 3 additions and 3 deletions
|
@ -2618,7 +2618,7 @@ void SpatialEditorViewport::_notification(int p_what) {
|
|||
if (show_fps) {
|
||||
String text;
|
||||
const float temp_fps = Engine::get_singleton()->get_frames_per_second();
|
||||
text += vformat(TTR("FPS: %d (%s ms)"), temp_fps, String::num(1000.0f / temp_fps, 2));
|
||||
text += vformat(TTR("FPS: %d (%s ms)"), temp_fps, rtos(1000.0f / temp_fps).pad_decimals(2));
|
||||
fps_label->set_text(text);
|
||||
}
|
||||
|
||||
|
|
|
@ -2248,10 +2248,10 @@ bool Main::iteration() {
|
|||
if (frame > 1000000) {
|
||||
if (editor || project_manager) {
|
||||
if (print_fps) {
|
||||
print_line(vformat("Editor FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(1)));
|
||||
print_line(vformat("Editor FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2)));
|
||||
}
|
||||
} else if (GLOBAL_GET("debug/settings/stdout/print_fps") || print_fps) {
|
||||
print_line(vformat("Project FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(1)));
|
||||
print_line(vformat("Project FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2)));
|
||||
}
|
||||
|
||||
Engine::get_singleton()->_fps = frames;
|
||||
|
|
Loading…
Reference in a new issue