Add command to show fps in titlebar
This commit is contained in:
parent
7683e0847c
commit
2651a60712
|
@ -14,11 +14,13 @@
|
||||||
#include "third_party/imgui/imgui.h"
|
#include "third_party/imgui/imgui.h"
|
||||||
#include "xenia/base/assert.h"
|
#include "xenia/base/assert.h"
|
||||||
#include "xenia/base/clock.h"
|
#include "xenia/base/clock.h"
|
||||||
|
#include "xenia/base/cvar.h"
|
||||||
#include "xenia/base/logging.h"
|
#include "xenia/base/logging.h"
|
||||||
#include "xenia/ui/imgui_drawer.h"
|
#include "xenia/ui/imgui_drawer.h"
|
||||||
|
|
||||||
#include "xenia/base/profiling.h"
|
#include "xenia/base/profiling.h"
|
||||||
|
|
||||||
|
DEFINE_bool(fps_titlebar, true, "Show FPS in titlebar", "General");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
|
@ -205,9 +207,11 @@ void Window::OnPaint(UIEvent* e) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
title_fps_text_ = base_title_;
|
title_fps_text_ = base_title_;
|
||||||
title_fps_text_ += " | ";
|
if (cvars::fps_titlebar) {
|
||||||
title_fps_text_ += std::to_string(game_fps_);
|
title_fps_text_ += " | ";
|
||||||
title_fps_text_ += " FPS";
|
title_fps_text_ += std::to_string(game_fps_);
|
||||||
|
title_fps_text_ += " FPS";
|
||||||
|
}
|
||||||
set_title(title_fps_text_, false);
|
set_title(title_fps_text_, false);
|
||||||
|
|
||||||
osd_fps_text_ = std::to_string(game_fps_);
|
osd_fps_text_ = std::to_string(game_fps_);
|
||||||
|
|
Loading…
Reference in New Issue