From 76b577148d40b3ac5ec40c5895ff7b2f7d6c6977 Mon Sep 17 00:00:00 2001 From: DrChat Date: Sun, 17 Dec 2017 22:16:00 -0600 Subject: [PATCH] [UI] Add game title ID to titlebar --- src/xenia/app/emulator_window.cc | 7 ++++--- src/xenia/emulator.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xenia/app/emulator_window.cc b/src/xenia/app/emulator_window.cc index 05822d8ec..0e403d195 100644 --- a/src/xenia/app/emulator_window.cc +++ b/src/xenia/app/emulator_window.cc @@ -381,9 +381,10 @@ void EmulatorWindow::ShowHelpWebsite() { LaunchBrowser("http://xenia.jp"); } void EmulatorWindow::UpdateTitle() { std::wstring title(base_title_); - auto game_title = emulator()->game_title(); - if (!game_title.empty()) { - title += L" - " + game_title; + if (emulator()->is_title_open()) { + auto game_title = emulator()->game_title(); + title += xe::format_string(L" | [%.8X] %s", emulator()->title_id(), + game_title.c_str()); } auto graphics_system = emulator()->graphics_system(); diff --git a/src/xenia/emulator.h b/src/xenia/emulator.h index 766e84956..4492419e7 100644 --- a/src/xenia/emulator.h +++ b/src/xenia/emulator.h @@ -56,6 +56,9 @@ class Emulator { // Title of the game in the default language. const std::wstring& game_title() const { return game_title_; } + // Currently running title ID + uint32_t title_id() const { return title_id_; } + // Are we currently running a title? bool is_title_open() const { return title_id_ != 0; }