diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-04-10 18:12:49 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-09-21 22:43:10 +0200 |
commit | 77f9ecd32b075fb8986103de5e446fa330210526 (patch) | |
tree | d1d7010fb7d0f2785f260700722e7e7498ad6ac4 /src/core/file_sys/card_image.cpp | |
parent | content_archive: Add accessors for Rights ID and SDK Version (diff) | |
download | yuzu-77f9ecd32b075fb8986103de5e446fa330210526.tar yuzu-77f9ecd32b075fb8986103de5e446fa330210526.tar.gz yuzu-77f9ecd32b075fb8986103de5e446fa330210526.tar.bz2 yuzu-77f9ecd32b075fb8986103de5e446fa330210526.tar.lz yuzu-77f9ecd32b075fb8986103de5e446fa330210526.tar.xz yuzu-77f9ecd32b075fb8986103de5e446fa330210526.tar.zst yuzu-77f9ecd32b075fb8986103de5e446fa330210526.zip |
Diffstat (limited to 'src/core/file_sys/card_image.cpp')
-rw-r--r-- | src/core/file_sys/card_image.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index 626ed0042..9fb6e0178 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp @@ -175,6 +175,26 @@ VirtualDir XCI::GetParentDirectory() const { return file->GetContainingDirectory(); } +VirtualDir XCI::ConcatenatedPseudoDirectory() { + const auto out = std::make_shared<VectorVfsDirectory>(); + for (const auto& part_id : {XCIPartition::Normal, XCIPartition::Logo, XCIPartition::Secure}) { + const auto& part = GetPartition(part_id); + if (part == nullptr) + continue; + + for (const auto& file : part->GetFiles()) + out->AddFile(file); + } + + return out; +} + +std::array<u8, 0x200> XCI::GetCertificate() const { + std::array<u8, 0x200> out; + file->Read(out.data(), out.size(), GAMECARD_CERTIFICATE_OFFSET); + return out; +} + Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) { const auto partition_index = static_cast<std::size_t>(part); const auto& partition = partitions[partition_index]; |