mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-03 00:38:58 +00:00
Remove IsNandTitle
This commit is contained in:
@@ -404,7 +404,7 @@ static std::string FindTMD(const std::string& path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SDMCImporter::LoadTMD(ContentType type, u64 id, TitleMetadata& out) const {
|
bool SDMCImporter::LoadTMD(ContentType type, u64 id, TitleMetadata& out) const {
|
||||||
const bool is_nand = IsNandTitle(type);
|
const bool is_nand = type == ContentType::NandTitle;
|
||||||
|
|
||||||
auto& title_db = is_nand ? nand_title_db : sdmc_title_db;
|
auto& title_db = is_nand ? nand_title_db : sdmc_title_db;
|
||||||
const auto physical_path =
|
const auto physical_path =
|
||||||
@@ -443,7 +443,7 @@ bool SDMCImporter::LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out
|
|||||||
|
|
||||||
std::shared_ptr<FileUtil::IOFile> SDMCImporter::OpenContent(const ContentSpecifier& specifier,
|
std::shared_ptr<FileUtil::IOFile> SDMCImporter::OpenContent(const ContentSpecifier& specifier,
|
||||||
u32 content_id) const {
|
u32 content_id) const {
|
||||||
if (IsNandTitle(specifier.type)) {
|
if (specifier.type == ContentType::NandTitle) {
|
||||||
const auto path =
|
const auto path =
|
||||||
fmt::format("{}{:08x}/{:08x}/content/{:08x}.app", config.system_titles_path,
|
fmt::format("{}{:08x}/{:08x}/content/{:08x}.app", config.system_titles_path,
|
||||||
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF), content_id);
|
(specifier.id >> 32), (specifier.id & 0xFFFFFFFF), content_id);
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ constexpr std::size_t ContentTypeCount = 7;
|
|||||||
constexpr bool IsTitle(ContentType type) {
|
constexpr bool IsTitle(ContentType type) {
|
||||||
return type == ContentType::Title || type == ContentType::NandTitle;
|
return type == ContentType::Title || type == ContentType::NandTitle;
|
||||||
}
|
}
|
||||||
constexpr bool IsNandTitle(ContentType type) {
|
|
||||||
return type == ContentType::NandTitle;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Struct that specifies an importable content.
|
* Struct that specifies an importable content.
|
||||||
|
|||||||
@@ -831,7 +831,7 @@ void ImportDialog::StartBatchDumpingCXI() {
|
|||||||
void ImportDialog::StartBuildingCIASingle(const Core::ContentSpecifier& specifier) {
|
void ImportDialog::StartBuildingCIASingle(const Core::ContentSpecifier& specifier) {
|
||||||
CIABuildDialog dialog(this,
|
CIABuildDialog dialog(this,
|
||||||
/*is_dir*/ false,
|
/*is_dir*/ false,
|
||||||
/*is_nand*/ Core::IsNandTitle(specifier.type),
|
/*is_nand*/ specifier.type == Core::ContentType::NandTitle,
|
||||||
/*enable_legit*/ importer->CanBuildLegitCIA(specifier),
|
/*enable_legit*/ importer->CanBuildLegitCIA(specifier),
|
||||||
last_build_cia_path);
|
last_build_cia_path);
|
||||||
if (dialog.exec() != QDialog::Accepted) {
|
if (dialog.exec() != QDialog::Accepted) {
|
||||||
@@ -875,9 +875,10 @@ void ImportDialog::StartBatchBuildingCIA() {
|
|||||||
|
|
||||||
to_import.erase(removed_iter, to_import.end());
|
to_import.erase(removed_iter, to_import.end());
|
||||||
|
|
||||||
const bool is_nand = std::all_of(
|
const bool is_nand = std::all_of(to_import.begin(), to_import.end(),
|
||||||
to_import.begin(), to_import.end(),
|
[](const Core::ContentSpecifier& specifier) {
|
||||||
[](const Core::ContentSpecifier& specifier) { return Core::IsNandTitle(specifier.type); });
|
return specifier.type == Core::ContentType::NandTitle;
|
||||||
|
});
|
||||||
const bool enable_legit = std::all_of(to_import.begin(), to_import.end(),
|
const bool enable_legit = std::all_of(to_import.begin(), to_import.end(),
|
||||||
[this](const Core::ContentSpecifier& specifier) {
|
[this](const Core::ContentSpecifier& specifier) {
|
||||||
return importer->CanBuildLegitCIA(specifier);
|
return importer->CanBuildLegitCIA(specifier);
|
||||||
|
|||||||
Reference in New Issue
Block a user