mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-08 00:39:57 +00:00
Reorganize code
This commit is contained in:
@@ -42,7 +42,11 @@ bool NCCHContainer::Load() {
|
||||
if (is_loaded)
|
||||
return true;
|
||||
|
||||
if (file->IsOpen()) {
|
||||
if (!file->IsOpen()) {
|
||||
LOG_WARNING(Service_FS, "Failed to open");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Reset read pointer in case this file has been read before.
|
||||
file->Seek(0, SEEK_SET);
|
||||
|
||||
@@ -146,8 +150,7 @@ bool NCCHContainer::Load() {
|
||||
LOG_DEBUG(Loader, "NCCH version 1");
|
||||
// In this version, CTR for each section is the section offset prefixed by partition
|
||||
// ID, as if the entire NCCH image is encrypted using a single CTR stream.
|
||||
std::copy(ncch_header.partition_id, ncch_header.partition_id + 8,
|
||||
exheader_ctr.begin());
|
||||
std::copy(ncch_header.partition_id, ncch_header.partition_id + 8, exheader_ctr.begin());
|
||||
exefs_ctr = romfs_ctr = exheader_ctr;
|
||||
auto u32ToBEArray = [](u32 value) -> std::array<u8, 4> {
|
||||
return std::array<u8, 4>{
|
||||
@@ -160,8 +163,7 @@ bool NCCHContainer::Load() {
|
||||
auto offset_exheader = u32ToBEArray(0x200); // exheader offset
|
||||
auto offset_exefs = u32ToBEArray(ncch_header.exefs_offset * kBlockSize);
|
||||
auto offset_romfs = u32ToBEArray(ncch_header.romfs_offset * kBlockSize);
|
||||
std::copy(offset_exheader.begin(), offset_exheader.end(),
|
||||
exheader_ctr.begin() + 12);
|
||||
std::copy(offset_exheader.begin(), offset_exheader.end(), exheader_ctr.begin() + 12);
|
||||
std::copy(offset_exefs.begin(), offset_exefs.end(), exefs_ctr.begin() + 12);
|
||||
std::copy(offset_romfs.begin(), offset_romfs.end(), romfs_ctr.begin() + 12);
|
||||
} else {
|
||||
@@ -175,8 +177,7 @@ bool NCCHContainer::Load() {
|
||||
|
||||
// System archives and DLC don't have an extended header but have RomFS
|
||||
if (ncch_header.extended_header_size) {
|
||||
if (file->ReadBytes(&exheader_header, sizeof(exheader_header)) !=
|
||||
sizeof(exheader_header)) {
|
||||
if (file->ReadBytes(&exheader_header, sizeof(exheader_header)) != sizeof(exheader_header)) {
|
||||
LOG_ERROR(Service_FS, "Could not read exheader from file");
|
||||
return false;
|
||||
}
|
||||
@@ -210,8 +211,7 @@ bool NCCHContainer::Load() {
|
||||
u8 resource_limit_category =
|
||||
exheader_header.arm11_system_local_caps.resource_limit_category;
|
||||
|
||||
LOG_DEBUG(Service_FS, "Name: {}",
|
||||
exheader_header.codeset_info.name);
|
||||
LOG_DEBUG(Service_FS, "Name: {}", exheader_header.codeset_info.name);
|
||||
LOG_DEBUG(Service_FS, "Program ID: {:016X}", ncch_header.program_id);
|
||||
LOG_DEBUG(Service_FS, "Entry point: 0x{:08X}", entry_point);
|
||||
LOG_DEBUG(Service_FS, "Code size: 0x{:08X}", code_size);
|
||||
@@ -241,8 +241,8 @@ bool NCCHContainer::Load() {
|
||||
|
||||
if (is_encrypted) {
|
||||
CryptoPP::byte* data = reinterpret_cast<CryptoPP::byte*>(&exefs_header);
|
||||
CryptoPP::CTR_Mode<CryptoPP::AES>::Decryption(primary_key.data(),
|
||||
primary_key.size(), exefs_ctr.data())
|
||||
CryptoPP::CTR_Mode<CryptoPP::AES>::Decryption(primary_key.data(), primary_key.size(),
|
||||
exefs_ctr.data())
|
||||
.ProcessData(data, data, sizeof(exefs_header));
|
||||
}
|
||||
|
||||
@@ -252,7 +252,6 @@ bool NCCHContainer::Load() {
|
||||
|
||||
if (ncch_header.romfs_offset != 0 && ncch_header.romfs_size != 0)
|
||||
has_romfs = true;
|
||||
}
|
||||
|
||||
is_loaded = true;
|
||||
return true;
|
||||
|
||||
+34
-56
@@ -535,10 +535,29 @@ bool SDMCImporter::LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out
|
||||
return LoadTMD(specifier.type, specifier.id, out);
|
||||
}
|
||||
|
||||
std::shared_ptr<FileUtil::IOFile> SDMCImporter::OpenContent(const ContentSpecifier& specifier,
|
||||
u32 content_id) const {
|
||||
if (IsNandTitle(specifier.type)) {
|
||||
const auto path =
|
||||
fmt::format("{}{:08x}/{:08x}/content/{:08x}.app", config.system_titles_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF), content_id);
|
||||
return std::make_shared<FileUtil::IOFile>(path, "rb");
|
||||
} else {
|
||||
// For DLCs, there one subfolder every 256 titles, but in practice hardcoded 00000000
|
||||
// should be fine (also matches GodMode9 behaviour)
|
||||
const auto format_str = specifier.type == ContentType::DLC
|
||||
? "/title/{:08x}/{:08x}/content/00000000/{:08x}.app"
|
||||
: "/title/{:08x}/{:08x}/content/{:08x}.app";
|
||||
const auto path =
|
||||
fmt::format(format_str, (specifier.id >> 32), (specifier.id & 0xFFFFFFFF), content_id);
|
||||
return std::make_shared<SDMCFile>(config.sdmc_path, path, "rb");
|
||||
}
|
||||
}
|
||||
|
||||
// English short title name, extdata id, icon
|
||||
using TitleData = std::tuple<std::string, u64, std::vector<u16>>;
|
||||
|
||||
TitleData LoadTitleData(NCCHContainer& ncch) {
|
||||
static TitleData LoadTitleData(NCCHContainer& ncch) {
|
||||
std::string codeset_name;
|
||||
ncch.ReadCodesetName(codeset_name);
|
||||
|
||||
@@ -634,11 +653,7 @@ bool SDMCImporter::DumpCXI(const ContentSpecifier& specifier, std::string destin
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto boot_content_path =
|
||||
fmt::format("/title/{:08x}/{:08x}/content/{:08x}.app", specifier.id >> 32,
|
||||
(specifier.id & 0xFFFFFFFF), tmd.GetBootContentID());
|
||||
dump_cxi_ncch = std::make_unique<NCCHContainer>(
|
||||
std::make_shared<SDMCFile>(config.sdmc_path, boot_content_path, "rb"));
|
||||
dump_cxi_ncch = std::make_unique<NCCHContainer>(OpenContent(specifier, tmd.GetBootContentID()));
|
||||
|
||||
if (destination.back() == '/' || destination.back() == '\\') {
|
||||
auto_filename = true;
|
||||
@@ -703,13 +718,6 @@ bool SDMCImporter::BuildCIA(CIABuildType build_type, const ContentSpecifier& spe
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool is_nand = IsNandTitle(specifier.type);
|
||||
const auto physical_path =
|
||||
is_nand ? fmt::format("{}{:08x}/{:08x}/content/", config.system_titles_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF))
|
||||
: fmt::format("{}title/{:08x}/{:08x}/content/", config.sdmc_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF));
|
||||
|
||||
if (destination.back() == '/' || destination.back() == '\\') {
|
||||
auto_filename = true;
|
||||
}
|
||||
@@ -722,15 +730,12 @@ bool SDMCImporter::BuildCIA(CIABuildType build_type, const ContentSpecifier& spe
|
||||
if (destination.back() != '/' && destination.back() != '\\') {
|
||||
destination.push_back('/');
|
||||
}
|
||||
const auto boot_content_path =
|
||||
fmt::format("{}{:08x}.app", physical_path, tmd.GetBootContentID());
|
||||
NCCHContainer ncch;
|
||||
if (is_nand) {
|
||||
ncch.OpenFile(std::make_shared<FileUtil::IOFile>(boot_content_path, "rb"));
|
||||
} else {
|
||||
const auto relative_path = boot_content_path.substr(config.sdmc_path.size() - 1);
|
||||
ncch.OpenFile(std::make_shared<SDMCFile>(config.sdmc_path, relative_path, "rb"));
|
||||
auto file = OpenContent(specifier, tmd.GetBootContentID());
|
||||
if (!file) {
|
||||
LOG_ERROR(Core, "Could not open boot content");
|
||||
return false;
|
||||
}
|
||||
NCCHContainer ncch(std::move(file));
|
||||
const auto filename =
|
||||
fmt::format("{} (v{}).{}", GetTitleFileName(ncch), tmd.GetTitleVersionString(),
|
||||
BuildTypeExts.at(static_cast<std::size_t>(build_type)));
|
||||
@@ -749,28 +754,18 @@ bool SDMCImporter::BuildCIA(CIABuildType build_type, const ContentSpecifier& spe
|
||||
}
|
||||
|
||||
for (const auto& tmd_chunk : tmd.tmd_chunks) {
|
||||
// For DLCs, there one subfolder every 256 titles, but in practice hardcoded 00000000
|
||||
// should be fine (also matches GodMode9)
|
||||
const auto sub_folder =
|
||||
specifier.type == ContentType::DLC ? physical_path + "00000000/" : physical_path;
|
||||
const auto path = fmt::format("{}{:08x}.app", sub_folder, static_cast<u32>(tmd_chunk.id));
|
||||
if (!FileUtil::Exists(path)) {
|
||||
auto file = OpenContent(specifier, tmd_chunk.id);
|
||||
if (!file) {
|
||||
if (static_cast<u16>(tmd_chunk.type) & 0x4000) { // optional
|
||||
continue;
|
||||
}
|
||||
LOG_ERROR(Core, "Content {:08x} does not exist", static_cast<u32>(tmd_chunk.id));
|
||||
LOG_ERROR(Core, "Could not open content {:08x}", static_cast<u32>(tmd_chunk.id));
|
||||
ret = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_nand) {
|
||||
NCCHContainer ncch(std::make_shared<FileUtil::IOFile>(path, "rb"));
|
||||
NCCHContainer ncch(std::move(file));
|
||||
ret = cia_builder->AddContent(tmd_chunk.id, ncch);
|
||||
} else {
|
||||
const auto relative_path = path.substr(config.sdmc_path.size() - 1);
|
||||
NCCHContainer ncch(std::make_shared<SDMCFile>(config.sdmc_path, relative_path, "rb"));
|
||||
ret = cia_builder->AddContent(tmd_chunk.id, ncch);
|
||||
}
|
||||
if (!ret) {
|
||||
return false;
|
||||
}
|
||||
@@ -821,35 +816,18 @@ bool SDMCImporter::CheckTitleContents(const ContentSpecifier& specifier,
|
||||
|
||||
Common::ProgressCallbackWrapper wrapper{specifier.maximum_size};
|
||||
|
||||
const bool is_nand = IsNandTitle(specifier.type);
|
||||
const auto physical_path =
|
||||
is_nand ? fmt::format("{}{:08x}/{:08x}/content/", config.system_titles_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF))
|
||||
: fmt::format("{}title/{:08x}/{:08x}/content/", config.sdmc_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF));
|
||||
for (const auto& tmd_chunk : tmd.tmd_chunks) {
|
||||
// For DLCs, there one subfolder every 256 titles, but in practice hardcoded 00000000
|
||||
// should be fine (also matches GodMode9)
|
||||
const auto sub_folder =
|
||||
specifier.type == ContentType::DLC ? physical_path + "00000000/" : physical_path;
|
||||
const auto path = fmt::format("{}{:08x}.app", sub_folder, static_cast<u32>(tmd_chunk.id));
|
||||
if (!FileUtil::Exists(path)) {
|
||||
auto file = OpenContent(specifier, tmd_chunk.id);
|
||||
if (!file) {
|
||||
if (static_cast<u16>(tmd_chunk.type) & 0x4000) { // optional
|
||||
continue;
|
||||
}
|
||||
LOG_INFO(Core, "Content {:08x} does not exist", static_cast<u32>(tmd_chunk.id));
|
||||
LOG_INFO(Core, "Could not open content {:08x}", static_cast<u32>(tmd_chunk.id));
|
||||
return false;
|
||||
}
|
||||
|
||||
std::shared_ptr<FileUtil::IOFile> source_file;
|
||||
if (is_nand) {
|
||||
source_file = std::make_shared<FileUtil::IOFile>(path, "rb");
|
||||
} else {
|
||||
const auto relative_path = path.substr(config.sdmc_path.size() - 1);
|
||||
source_file = std::make_shared<SDMCFile>(config.sdmc_path, relative_path, "rb");
|
||||
}
|
||||
std::shared_ptr<HashOnlyFile> dest_file = std::make_shared<HashOnlyFile>();
|
||||
if (!file_decryptor.CryptAndWriteFile(source_file, source_file->GetSize(), dest_file,
|
||||
if (!file_decryptor.CryptAndWriteFile(file, file->GetSize(), dest_file,
|
||||
wrapper.Wrap(callback))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-2
@@ -176,8 +176,8 @@ public:
|
||||
bool LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out) const;
|
||||
|
||||
std::string GetTitleContentsPath(const ContentSpecifier& specifier) const;
|
||||
std::shared_ptr<FileUtil::IOFile> OpenBootContent(const ContentSpecifier& specifier,
|
||||
const TitleMetadata& tmd) const;
|
||||
std::shared_ptr<FileUtil::IOFile> OpenContent(const ContentSpecifier& specifier,
|
||||
u32 content_id) const;
|
||||
|
||||
std::shared_ptr<TicketDB>& GetTicketDB() {
|
||||
return ticket_db;
|
||||
|
||||
@@ -490,7 +490,7 @@ void ImportDialog::OnContextMenu(const QPoint& point) {
|
||||
[this, specifier] { StartBuildingCIASingle(specifier); });
|
||||
QAction* show_title_info = context_menu.addAction(tr("Show Title Info"));
|
||||
connect(show_title_info, &QAction::triggered, [this, specifier] {
|
||||
TitleInfoDialog dialog(this, config, *importer, specifier);
|
||||
TitleInfoDialog dialog(this, *importer, specifier);
|
||||
dialog.exec();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "frontend/title_info_dialog.h"
|
||||
#include "ui_title_info_dialog.h"
|
||||
|
||||
TitleInfoDialog::TitleInfoDialog(QWidget* parent, const Core::Config& config,
|
||||
Core::SDMCImporter& importer_, Core::ContentSpecifier specifier_)
|
||||
TitleInfoDialog::TitleInfoDialog(QWidget* parent, Core::SDMCImporter& importer_,
|
||||
Core::ContentSpecifier specifier_)
|
||||
: QDialog(parent), ui(std::make_unique<Ui::TitleInfoDialog>()), importer(importer_),
|
||||
specifier(std::move(specifier_)) {
|
||||
|
||||
@@ -25,39 +25,62 @@ TitleInfoDialog::TitleInfoDialog(QWidget* parent, const Core::Config& config,
|
||||
const double scale = qApp->desktop()->logicalDpiX() / 96.0;
|
||||
resize(static_cast<int>(width() * scale), static_cast<int>(height() * scale));
|
||||
|
||||
LoadInfo(config);
|
||||
LoadInfo();
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &TitleInfoDialog::accept);
|
||||
}
|
||||
|
||||
TitleInfoDialog::~TitleInfoDialog() = default;
|
||||
|
||||
void TitleInfoDialog::LoadInfo(const Core::Config& config) {
|
||||
void TitleInfoDialog::LoadInfo() {
|
||||
// Load TMD & boot NCCH
|
||||
Core::TitleMetadata tmd;
|
||||
if (!importer.LoadTMD(specifier, tmd)) {
|
||||
Core::NCCHContainer ncch;
|
||||
if (!importer.LoadTMD(specifier, tmd) ||
|
||||
!ncch.OpenFile(importer.OpenContent(specifier, tmd.GetBootContentID()))) {
|
||||
|
||||
QMessageBox::warning(this, tr("threeSD"), tr("Could not load title information."));
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
ui->versionLineEdit->setText(QString::fromStdString(tmd.GetTitleVersionString()));
|
||||
ui->titleIDLineEdit->setText(QStringLiteral("%1").arg(specifier.id, 16, 16, QLatin1Char{'0'}));
|
||||
|
||||
const bool is_nand = Core::IsNandTitle(specifier.type);
|
||||
const auto physical_path =
|
||||
is_nand ? fmt::format("{}{:08x}/{:08x}/content/", config.system_titles_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF))
|
||||
: fmt::format("{}title/{:08x}/{:08x}/content/", config.sdmc_path,
|
||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF));
|
||||
const auto boot_content_path =
|
||||
fmt::format("{}{:08x}.app", physical_path, tmd.GetBootContentID());
|
||||
Core::NCCHContainer ncch;
|
||||
if (is_nand) {
|
||||
ncch.OpenFile(std::make_shared<FileUtil::IOFile>(boot_content_path, "rb"));
|
||||
} else {
|
||||
const auto relative_path = boot_content_path.substr(config.sdmc_path.size() - 1);
|
||||
ncch.OpenFile(std::make_shared<Core::SDMCFile>(config.sdmc_path, relative_path, "rb"));
|
||||
// Load SMDH from boot NCCH
|
||||
bool has_smdh = false;
|
||||
std::vector<u8> smdh_buffer;
|
||||
if (ncch.LoadSectionExeFS("icon", smdh_buffer) && smdh_buffer.size() == sizeof(Core::SMDH) &&
|
||||
Core::IsValidSMDH(smdh_buffer)) {
|
||||
|
||||
has_smdh = true;
|
||||
std::memcpy(&smdh, smdh_buffer.data(), smdh_buffer.size());
|
||||
}
|
||||
|
||||
// Basic info
|
||||
ui->versionLineEdit->setText(QString::fromStdString(tmd.GetTitleVersionString()));
|
||||
LoadEncryption(ncch);
|
||||
ui->titleIDLineEdit->setText(QStringLiteral("%1").arg(specifier.id, 16, 16, QLatin1Char{'0'}));
|
||||
|
||||
// Icons
|
||||
if (has_smdh) {
|
||||
ui->iconLargeLabel->setPixmap(
|
||||
QPixmap::fromImage(QImage(reinterpret_cast<const uchar*>(smdh.GetIcon(true).data()), 48,
|
||||
48, QImage::Format::Format_RGB16)));
|
||||
ui->iconSmallLabel->setPixmap(
|
||||
QPixmap::fromImage(QImage(reinterpret_cast<const uchar*>(smdh.GetIcon(false).data()),
|
||||
24, 24, QImage::Format::Format_RGB16)));
|
||||
}
|
||||
|
||||
// Names
|
||||
if (has_smdh) {
|
||||
InitializeLanguageComboBox();
|
||||
} else {
|
||||
ui->namesGroupBox->setVisible(false);
|
||||
}
|
||||
|
||||
// Checks
|
||||
InitializeChecks(tmd);
|
||||
}
|
||||
|
||||
void TitleInfoDialog::LoadEncryption(Core::NCCHContainer& ncch) {
|
||||
static const std::unordered_map<Core::EncryptionType, const char*> EncryptionTypeMap{{
|
||||
{Core::EncryptionType::None, QT_TR_NOOP("None")},
|
||||
{Core::EncryptionType::FixedKey, QT_TR_NOOP("FixedKey")},
|
||||
@@ -78,50 +101,6 @@ void TitleInfoDialog::LoadInfo(const Core::Config& config) {
|
||||
encryption_text.append(tr(" (Seed)"));
|
||||
}
|
||||
ui->encryptionLineEdit->setText(encryption_text);
|
||||
|
||||
// Checks
|
||||
const bool tmd_legit = tmd.ValidateSignature() && tmd.VerifyHashes();
|
||||
if (tmd_legit) {
|
||||
ui->tmdCheckLabel->setText(tr("Legit"));
|
||||
} else {
|
||||
ui->tmdCheckLabel->setText(tr("Illegit"));
|
||||
}
|
||||
|
||||
if (const auto& ticket_db = importer.GetTicketDB();
|
||||
ticket_db && ticket_db->tickets.count(specifier.id)) {
|
||||
|
||||
const bool ticket_legit = ticket_db->tickets.at(specifier.id).ValidateSignature();
|
||||
if (ticket_legit) {
|
||||
ui->ticketCheckLabel->setText(tr("Legit"));
|
||||
} else {
|
||||
ui->ticketCheckLabel->setText(tr("Illegit"));
|
||||
}
|
||||
} else {
|
||||
ui->ticketCheckLabel->setText(tr("Missing"));
|
||||
}
|
||||
connect(ui->contentsCheckButton, &QPushButton::clicked, this,
|
||||
&TitleInfoDialog::ExecuteContentsCheck);
|
||||
|
||||
// Load SMDH
|
||||
std::vector<u8> smdh_buffer;
|
||||
if (!ncch.LoadSectionExeFS("icon", smdh_buffer) || smdh_buffer.size() != sizeof(Core::SMDH) ||
|
||||
!Core::IsValidSMDH(smdh_buffer)) {
|
||||
|
||||
LOG_WARNING(Core, "Failed to load SMDH");
|
||||
ui->namesGroupBox->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
std::memcpy(&smdh, smdh_buffer.data(), smdh_buffer.size());
|
||||
// Load icon
|
||||
ui->iconLargeLabel->setPixmap(
|
||||
QPixmap::fromImage(QImage(reinterpret_cast<const uchar*>(smdh.GetIcon(true).data()), 48, 48,
|
||||
QImage::Format::Format_RGB16)));
|
||||
ui->iconSmallLabel->setPixmap(
|
||||
QPixmap::fromImage(QImage(reinterpret_cast<const uchar*>(smdh.GetIcon(false).data()), 24,
|
||||
24, QImage::Format::Format_RGB16)));
|
||||
// Load names
|
||||
InitializeLanguageComboBox();
|
||||
}
|
||||
|
||||
void TitleInfoDialog::InitializeLanguageComboBox() {
|
||||
@@ -172,6 +151,30 @@ void TitleInfoDialog::UpdateNames() {
|
||||
QString::fromStdString(Common::UTF16BufferToUTF8(title.publisher)));
|
||||
}
|
||||
|
||||
void TitleInfoDialog::InitializeChecks(Core::TitleMetadata& tmd) {
|
||||
const bool tmd_legit = tmd.ValidateSignature() && tmd.VerifyHashes();
|
||||
if (tmd_legit) {
|
||||
ui->tmdCheckLabel->setText(tr("Legit"));
|
||||
} else {
|
||||
ui->tmdCheckLabel->setText(tr("Illegit"));
|
||||
}
|
||||
|
||||
if (const auto& ticket_db = importer.GetTicketDB();
|
||||
ticket_db && ticket_db->tickets.count(specifier.id)) {
|
||||
|
||||
const bool ticket_legit = ticket_db->tickets.at(specifier.id).ValidateSignature();
|
||||
if (ticket_legit) {
|
||||
ui->ticketCheckLabel->setText(tr("Legit"));
|
||||
} else {
|
||||
ui->ticketCheckLabel->setText(tr("Illegit"));
|
||||
}
|
||||
} else {
|
||||
ui->ticketCheckLabel->setText(tr("Missing"));
|
||||
}
|
||||
connect(ui->contentsCheckButton, &QPushButton::clicked, this,
|
||||
&TitleInfoDialog::ExecuteContentsCheck);
|
||||
}
|
||||
|
||||
void TitleInfoDialog::ExecuteContentsCheck() {
|
||||
auto* job = new SimpleJob(
|
||||
this,
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
namespace Core {
|
||||
struct Config;
|
||||
class ContentSpecifier;
|
||||
class NCCHContainer;
|
||||
class SDMCImporter;
|
||||
class TitleMetadata;
|
||||
} // namespace Core
|
||||
@@ -21,13 +22,17 @@ class TitleInfoDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TitleInfoDialog(QWidget* parent, const Core::Config& config,
|
||||
Core::SDMCImporter& importer, Core::ContentSpecifier specifier);
|
||||
explicit TitleInfoDialog(QWidget* parent, Core::SDMCImporter& importer,
|
||||
Core::ContentSpecifier specifier);
|
||||
~TitleInfoDialog();
|
||||
|
||||
private:
|
||||
void LoadInfo(const Core::Config& config);
|
||||
void LoadInfo();
|
||||
|
||||
void LoadEncryption(Core::NCCHContainer& ncch);
|
||||
void InitializeLanguageComboBox();
|
||||
void InitializeChecks(Core::TitleMetadata& tmd);
|
||||
|
||||
void UpdateNames();
|
||||
void ExecuteContentsCheck();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user