DolphinWX: Show the required IOS version in info panel

This is useful to know which IOS version is required by a title without
having to look at the TMD manually.

The IOS version row will only appear if there is a TMD, of course.
This commit is contained in:
Léo Lam 2017-01-23 15:14:41 +01:00
parent 1cb87a9e43
commit ceb1797977
2 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include "Common/MD5.h"
#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
#include "Core/IOS/ES/Formats.h"
#include "DiscIO/Enums.h"
#include "DiscIO/Volume.h"
#include "DolphinWX/ISOFile.h"
@ -179,6 +180,12 @@ void InfoPanel::LoadISODetails()
m_revision->SetValue(StrToWxStr(std::to_string(m_opened_iso->GetRevision())));
m_date->SetValue(StrToWxStr(m_opened_iso->GetApploaderDate()));
m_fst->SetValue(StrToWxStr(std::to_string(m_opened_iso->GetFSTSize())));
if (m_ios_version)
{
IOS::HLE::TMDReader tmd{m_opened_iso->GetTMD()};
if (tmd.IsValid())
m_ios_version->SetValue(StringFromFormat("IOS%u", static_cast<u32>(tmd.GetIOSId())));
}
}
void InfoPanel::LoadBannerDetails()
@ -216,6 +223,8 @@ wxStaticBoxSizer* InfoPanel::CreateISODetailsSizer()
{_("Apploader Date:"), m_date},
{_("FST Size:"), m_fst},
}};
if (!m_opened_iso->GetTMD().empty())
controls.emplace_back(_("IOS Version:"), m_ios_version);
const int space_10 = FromDIP(10);
auto* const iso_details = new wxGridBagSizer(space_10, space_10);

View File

@ -62,6 +62,7 @@ private:
wxTextCtrl* m_revision;
wxTextCtrl* m_date;
wxTextCtrl* m_fst;
wxTextCtrl* m_ios_version = nullptr;
wxTextCtrl* m_md5_sum;
wxButton* m_md5_sum_compute;
wxChoice* m_languages;