mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Qt: Re-add IOS version to the game info tab
This was accidentally removed during the Qt migration: https://github.com/dolphin-emu/dolphin/pull/4734
This commit is contained in:
parent
f9deb68aee
commit
7097a7b3af
@ -17,6 +17,7 @@
|
||||
|
||||
#include "DiscIO/Blob.h"
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
|
||||
#include "DolphinQt/Config/InfoWidget.h"
|
||||
#include "DolphinQt/QtUtils/ImageConverter.h"
|
||||
@ -25,6 +26,8 @@
|
||||
|
||||
InfoWidget::InfoWidget(const UICommon::GameFile& game) : m_game(game)
|
||||
{
|
||||
m_volume = DiscIO::CreateVolume(m_game.GetFilePath());
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
|
||||
layout->addWidget(CreateFileDetails());
|
||||
@ -36,6 +39,8 @@ InfoWidget::InfoWidget(const UICommon::GameFile& game) : m_game(game)
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
InfoWidget::~InfoWidget() = default;
|
||||
|
||||
QGroupBox* InfoWidget::CreateFileDetails()
|
||||
{
|
||||
QGroupBox* group = new QGroupBox(tr("File Details"));
|
||||
@ -121,6 +126,17 @@ QGroupBox* InfoWidget::CreateGameDetails()
|
||||
if (!m_game.GetApploaderDate().empty())
|
||||
layout->addRow(tr("Apploader Date:"), CreateValueDisplay(m_game.GetApploaderDate()));
|
||||
|
||||
if (m_volume)
|
||||
{
|
||||
const DiscIO::Partition partition = m_volume->GetGamePartition();
|
||||
const IOS::ES::TMDReader& tmd = m_volume->GetTMD(partition);
|
||||
if (tmd.IsValid())
|
||||
{
|
||||
const auto ios = fmt::format("IOS{}", static_cast<u32>(tmd.GetIOSId()));
|
||||
layout->addRow(tr("IOS Version:"), CreateValueDisplay(ios));
|
||||
}
|
||||
}
|
||||
|
||||
group->setLayout(layout);
|
||||
return group;
|
||||
}
|
||||
|
@ -4,12 +4,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "UICommon/GameFile.h"
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
class Volume;
|
||||
}
|
||||
|
||||
class QComboBox;
|
||||
class QGroupBox;
|
||||
class QLineEdit;
|
||||
@ -21,6 +27,7 @@ class InfoWidget final : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit InfoWidget(const UICommon::GameFile& game);
|
||||
~InfoWidget() override;
|
||||
|
||||
private:
|
||||
void ChangeLanguage();
|
||||
@ -34,6 +41,7 @@ private:
|
||||
void CreateLanguageSelector();
|
||||
QWidget* CreateBannerGraphic(const QPixmap& image);
|
||||
|
||||
std::unique_ptr<DiscIO::Volume> m_volume;
|
||||
UICommon::GameFile m_game;
|
||||
QComboBox* m_language_selector;
|
||||
QLineEdit* m_name = {};
|
||||
|
Loading…
Reference in New Issue
Block a user