[UI] Add game title ID to titlebar

This commit is contained in:
DrChat 2017-12-17 22:16:00 -06:00
parent 6e0550d46b
commit 76b577148d
2 changed files with 7 additions and 3 deletions

View File

@ -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();

View File

@ -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; }