diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-16 22:57:00 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 17:52:44 +0200 |
commit | a9dc5a3c1058d22873a201c08bd6d095405789ae (patch) | |
tree | daa6c23dcc4f3b3367eaf254689e427865b9e84e /src/core/file_sys/card_image.cpp | |
parent | Merge pull request #1157 from lioncash/vec (diff) | |
download | yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.gz yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.bz2 yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.lz yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.xz yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.zst yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.zip |
Diffstat (limited to 'src/core/file_sys/card_image.cpp')
-rw-r--r-- | src/core/file_sys/card_image.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 1d7c7fb10..508f09e56 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -43,6 +43,8 @@ XCI::XCI(VirtualFile file_) : file(std::move(file_)), partitions(0x4) { partitions[static_cast<size_t>(partition)] = std::make_shared<PartitionFilesystem>(raw); } + program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA; + auto result = AddNCAFromPartition(XCIPartition::Secure); if (result != Loader::ResultStatus::Success) { status = result; @@ -76,6 +78,10 @@ Loader::ResultStatus XCI::GetStatus() const { return status; } +Loader::ResultStatus XCI::GetProgramNCAStatus() const { + return program_nca_status; +} + VirtualDir XCI::GetPartition(XCIPartition partition) const { return partitions[static_cast<size_t>(partition)]; } @@ -143,6 +149,9 @@ Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) { if (file->GetExtension() != "nca") continue; auto nca = std::make_shared<NCA>(file); + if (nca->GetType() == NCAContentType::Program) { + program_nca_status = nca->GetStatus(); + } if (nca->GetStatus() == Loader::ResultStatus::Success) { ncas.push_back(std::move(nca)); } else { |