Merge pull request #6423 from leoetlino/tid

UI: Show title ID in info panel
This commit is contained in:
Anthony 2018-03-07 10:47:43 -08:00 committed by GitHub
commit 1a1133bf8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

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

View File

@ -5,6 +5,7 @@
#include "DolphinWX/ISOProperties/InfoPanel.h"
#include <algorithm>
#include <cinttypes>
#include <iterator>
#include <optional>
#include <string>
@ -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<u32>(tmd.GetIOSId())));
m_game_id->SetValue(StrToWxStr(StringFromFormat(
"%s (%016" PRIx64 ")", m_opened_iso->GetGameID().c_str(), tmd.GetTitleId())));
}
}
}