From 3af09da0f330893db02f04a566302ac44125f3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 7 Mar 2018 17:31:04 +0100 Subject: [PATCH] UI: Show title ID in info panel Add a way to easily get the title ID of a game. For Wii titles, it's sometimes more useful to know than the game ID. --- Source/Core/DolphinQt2/Config/InfoWidget.cpp | 5 ++++- Source/Core/DolphinWX/ISOProperties/InfoPanel.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/Config/InfoWidget.cpp b/Source/Core/DolphinQt2/Config/InfoWidget.cpp index c71648805e..bbf8aa4867 100644 --- a/Source/Core/DolphinQt2/Config/InfoWidget.cpp +++ b/Source/Core/DolphinQt2/Config/InfoWidget.cpp @@ -32,7 +32,10 @@ QGroupBox* InfoWidget::CreateISODetails() QLineEdit* file_path = CreateValueDisplay(m_game.GetFilePath()); QLineEdit* internal_name = CreateValueDisplay(m_game.GetInternalName()); - QLineEdit* game_id = CreateValueDisplay(m_game.GetGameID()); + QString game_id_string = m_game.GetGameID(); + if (const u64 title_id = m_game.GetTitleID()) + game_id_string += QStringLiteral(" (%1)").arg(title_id, 16, 16, QLatin1Char('0')); + QLineEdit* game_id = CreateValueDisplay(game_id_string); QLineEdit* country = CreateValueDisplay(m_game.GetCountry()); QLineEdit* maker = CreateValueDisplay(m_game.GetMaker()); QLineEdit* maker_id = CreateValueDisplay(QStringLiteral("0x") + m_game.GetMakerID()); diff --git a/Source/Core/DolphinWX/ISOProperties/InfoPanel.cpp b/Source/Core/DolphinWX/ISOProperties/InfoPanel.cpp index 36fba6c543..45a6121813 100644 --- a/Source/Core/DolphinWX/ISOProperties/InfoPanel.cpp +++ b/Source/Core/DolphinWX/ISOProperties/InfoPanel.cpp @@ -5,6 +5,7 @@ #include "DolphinWX/ISOProperties/InfoPanel.h" #include +#include #include #include #include @@ -190,7 +191,11 @@ void InfoPanel::LoadISODetails() { const IOS::ES::TMDReader tmd = m_opened_iso->GetTMD(m_opened_iso->GetGamePartition()); if (tmd.IsValid()) + { m_ios_version->SetValue(StringFromFormat("IOS%u", static_cast(tmd.GetIOSId()))); + m_game_id->SetValue(StrToWxStr(StringFromFormat( + "%s (%016" PRIx64 ")", m_opened_iso->GetGameID().c_str(), tmd.GetTitleId()))); + } } }