From 956c30f0e6a4f0c4a6e65dc84a4542dec55fcbb1 Mon Sep 17 00:00:00 2001 From: illusion98 <37698908+illusion98@users.noreply.github.com> Date: Mon, 9 Sep 2019 08:38:27 -0500 Subject: [PATCH] Add command to show fps in titlebar --- src/xenia/ui/window.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/xenia/ui/window.cc b/src/xenia/ui/window.cc index 530d4e055..55bd6164b 100644 --- a/src/xenia/ui/window.cc +++ b/src/xenia/ui/window.cc @@ -14,10 +14,13 @@ #include "third_party/imgui/imgui.h" #include "xenia/base/assert.h" #include "xenia/base/clock.h" +#include "xenia/base/cvar.h" #include "xenia/base/logging.h" #include "xenia/base/profiling.h" #include "xenia/ui/imgui_drawer.h" +DEFINE_bool(fps_titlebar, true, "Show FPS in titlebar", "General"); + namespace xe { namespace ui { @@ -200,9 +203,11 @@ void Window::OnPaint(UIEvent* e) { #endif title_fps_text_ = base_title_; - title_fps_text_ += L" | "; - title_fps_text_ += std::to_wstring(game_fps_); - title_fps_text_ += L" FPS"; + if (cvars::fps_titlebar) { + title_fps_text_ += L" | "; + title_fps_text_ += std::to_wstring(game_fps_); + title_fps_text_ += L" FPS"; + } set_title(title_fps_text_, false); osd_fps_text_ = std::to_string(game_fps_);