Improve command line --print-fps
display
- Display the frame time in addition to FPS. - Frame time is a more objective measurement in comparison to FPS, but FPS is more familiar to people less acquainted with profiling. - Rename "Game" to "Project" for the project FPS printing line.
This commit is contained in:
parent
cba3b024b5
commit
157d8e4d36
1 changed files with 2 additions and 2 deletions
|
@ -2537,10 +2537,10 @@ bool Main::iteration() {
|
||||||
if (frame > 1000000) {
|
if (frame > 1000000) {
|
||||||
if (editor || project_manager) {
|
if (editor || project_manager) {
|
||||||
if (print_fps) {
|
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) {
|
} 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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Engine::get_singleton()->_fps = frames;
|
Engine::get_singleton()->_fps = frames;
|
||||||
|
|
Loading…
Reference in a new issue