[UI] Add game title ID to titlebar
This commit is contained in:
parent
6e0550d46b
commit
76b577148d
|
@ -381,9 +381,10 @@ void EmulatorWindow::ShowHelpWebsite() { LaunchBrowser("http://xenia.jp"); }
|
||||||
void EmulatorWindow::UpdateTitle() {
|
void EmulatorWindow::UpdateTitle() {
|
||||||
std::wstring title(base_title_);
|
std::wstring title(base_title_);
|
||||||
|
|
||||||
|
if (emulator()->is_title_open()) {
|
||||||
auto game_title = emulator()->game_title();
|
auto game_title = emulator()->game_title();
|
||||||
if (!game_title.empty()) {
|
title += xe::format_string(L" | [%.8X] %s", emulator()->title_id(),
|
||||||
title += L" - " + game_title;
|
game_title.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto graphics_system = emulator()->graphics_system();
|
auto graphics_system = emulator()->graphics_system();
|
||||||
|
|
|
@ -56,6 +56,9 @@ class Emulator {
|
||||||
// Title of the game in the default language.
|
// Title of the game in the default language.
|
||||||
const std::wstring& game_title() const { return game_title_; }
|
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?
|
// Are we currently running a title?
|
||||||
bool is_title_open() const { return title_id_ != 0; }
|
bool is_title_open() const { return title_id_ != 0; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue