summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-12-21 09:26:49 +0100
committerGitHub <noreply@github.com>2021-12-21 09:26:49 +0100
commit87c3e284c516eb80e79a3137051295e999a2f4d1 (patch)
tree9d02377250d8342117cf113013835dab45c9738a /main
parentcee4b5955193694d37f0225450a3ac7d62ff826d (diff)
parenta924cb3b54deea26a2071a936fa7fde228a9d9dd (diff)
Merge pull request #56106 from Calinou/print-fps-vsync-mode
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 805c8c2c84..9b7f960660 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1603,6 +1603,24 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
display_server->screen_set_orientation(window_orientation);
}
+ if (GLOBAL_GET("debug/settings/stdout/print_fps") || print_fps) {
+ // Print requested V-Sync mode at startup to diagnose the printed FPS not going above the monitor refresh rate.
+ switch (window_vsync_mode) {
+ case DisplayServer::VSyncMode::VSYNC_DISABLED:
+ print_line("Requested V-Sync mode: Disabled");
+ break;
+ case DisplayServer::VSyncMode::VSYNC_ENABLED:
+ print_line("Requested V-Sync mode: Enabled - FPS will likely be capped to the monitor refresh rate.");
+ break;
+ case DisplayServer::VSyncMode::VSYNC_ADAPTIVE:
+ print_line("Requested V-Sync mode: Adaptive");
+ break;
+ case DisplayServer::VSyncMode::VSYNC_MAILBOX:
+ print_line("Requested V-Sync mode: Mailbox");
+ break;
+ }
+ }
+
/* Initialize Pen Tablet Driver */
{