diff options
author | Lioncash <mathew1800@gmail.com> | 2019-06-11 05:13:14 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-06-11 05:27:13 +0200 |
commit | 81d361d9f89ba8eada4bf2e414cf610873045ac6 (patch) | |
tree | fb286d8e3b274ebc4b6c466ce01025949086a3d9 /src | |
parent | file_sys/card_image: Assign collapsed NCA contents directly to ncas member (diff) | |
download | yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.gz yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.bz2 yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.lz yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.xz yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.zst yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/card_image.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index d116d79c1..1a5faa43a 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -63,8 +63,9 @@ XCI::XCI(VirtualFile file_) program = secure_partition->GetNCA(secure_partition->GetProgramTitleID(), ContentRecordType::Program); program_nca_status = secure_partition->GetProgramStatus(secure_partition->GetProgramTitleID()); - if (program_nca_status == Loader::ResultStatus::ErrorNSPMissingProgramNCA) + if (program_nca_status == Loader::ResultStatus::ErrorNSPMissingProgramNCA) { program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA; + } auto result = AddNCAFromPartition(XCIPartition::Update); if (result != Loader::ResultStatus::Success) { @@ -152,8 +153,9 @@ std::shared_ptr<NCA> XCI::GetNCAByType(NCAContentType type) const { VirtualFile XCI::GetNCAFileByType(NCAContentType type) const { auto nca = GetNCAByType(type); - if (nca != nullptr) + if (nca != nullptr) { return nca->GetBaseFile(); + } return nullptr; } @@ -179,12 +181,14 @@ Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) { } for (const VirtualFile& file : partitions[static_cast<std::size_t>(part)]->GetFiles()) { - if (file->GetExtension() != "nca") + if (file->GetExtension() != "nca") { continue; + } auto nca = std::make_shared<NCA>(file, nullptr, 0, keys); // TODO(DarkLordZach): Add proper Rev1+ Support - if (nca->IsUpdate()) + if (nca->IsUpdate()) { continue; + } if (nca->GetType() == NCAContentType::Program) { program_nca_status = nca->GetStatus(); } |