Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve command line --print-fps display #47735

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2537,10 +2537,10 @@ bool Main::iteration() {
if (frame > 1000000) {
if (editor || project_manager) {
if (print_fps) {
print_line("Editor FPS: " + itos(frames));
print_line(vformat("Editor FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(1)));
}
} else if (GLOBAL_GET("debug/settings/stdout/print_fps") || print_fps) {
print_line("Game FPS: " + itos(frames));
print_line(vformat("Project FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(1)));
Comment on lines +2540 to +2543
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrote this on Twitter, but I'll post here too: I suggest s/mspf/ms

}

Engine::get_singleton()->_fps = frames;
Expand Down