summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 7e80448d89..191f4d684f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -342,9 +342,9 @@ void Main::print_help(const char *p_binary) {
OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n");
OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n");
OS::get_singleton()->print(" --gpu-profile Show a GPU profile of the tasks that took the most time during frame rendering.\n");
- OS::get_singleton()->print(" --vk-layers Enable Vulkan validation layers for debugging.\n");
+ OS::get_singleton()->print(" --gpu-validation Enable graphics API validation layers for debugging.\n");
#if DEBUG_ENABLED
- OS::get_singleton()->print(" --gpu-abort Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes.\n");
+ OS::get_singleton()->print(" --gpu-abort Abort on graphics API usage errors (usually validation layer errors). May help see the problem if your system freezes.\n");
#endif
OS::get_singleton()->print(" --remote-debug <uri> Remote debug (<protocol>://<host/IP>[:<port>], e.g. tcp://127.0.0.1:6007).\n");
#if defined(DEBUG_ENABLED)
@@ -831,7 +831,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->print("Missing GPU index argument, aborting.\n");
goto error;
}
- } else if (I->get() == "--vk-layers") {
+ } else if (I->get() == "--gpu-validation") {
Engine::singleton->use_validation_layers = true;
#ifdef DEBUG_ENABLED
} else if (I->get() == "--gpu-abort") {
@@ -2634,6 +2634,7 @@ bool Main::start() {
uint64_t Main::last_ticks = 0;
uint32_t Main::frames = 0;
+uint32_t Main::hide_print_fps_attempts = 3;
uint32_t Main::frame = 0;
bool Main::force_redraw_requested = false;
int Main::iterating = 0;
@@ -2774,12 +2775,17 @@ bool Main::iteration() {
Engine::get_singleton()->_process_frames++;
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(2)));
+ // Wait a few seconds before printing FPS, as FPS reporting just after the engine has started is inaccurate.
+ if (hide_print_fps_attempts == 0) {
+ if (editor || project_manager) {
+ if (print_fps) {
+ print_line(vformat("Editor FPS: %d (%s mspf)", frames, rtos(1000.0 / frames).pad_decimals(2)));
+ }
+ } else if (print_fps || GLOBAL_GET("debug/settings/stdout/print_fps")) {
+ print_line(vformat("Project 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(2)));
+ } else {
+ hide_print_fps_attempts--;
}
Engine::get_singleton()->_fps = frames;