From b117b2667fb9053987143b77f3dbeb446cf9ed07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:44:18 +0100 Subject: [PATCH] Displays FPS before frame latency (#1736) --- src/core/devtools/layer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/devtools/layer.cpp b/src/core/devtools/layer.cpp index 2c2099f4d..776f3377d 100644 --- a/src/core/devtools/layer.cpp +++ b/src/core/devtools/layer.cpp @@ -254,7 +254,7 @@ void L::DrawAdvanced() { void L::DrawSimple() { const auto io = GetIO(); - Text("Frame time: %.3f ms (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + Text("%.1f FPS (%.2f ms)", io.Framerate, 1000.0f / io.Framerate); } static void LoadSettings(const char* line) { @@ -338,6 +338,7 @@ void L::Draw() { const auto fn = DebugState.flip_frame_count.load(); frame_graph.AddFrame(fn, io.DeltaTime); } + if (IsKeyPressed(ImGuiKey_F10, false)) { if (io.KeyCtrl) { show_advanced_debug = !show_advanced_debug;