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 | |
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 |
-rw-r--r-- | src/core/file_sys/card_image.cpp | 20 | ||||
-rw-r--r-- | src/core/file_sys/card_image.h | 4 |
2 files changed, 24 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]; diff --git a/src/core/file_sys/card_image.h b/src/core/file_sys/card_image.h index a350496f7..5a83acc1c 100644 --- a/src/core/file_sys/card_image.h +++ b/src/core/file_sys/card_image.h @@ -91,6 +91,8 @@ public: VirtualDir GetLogoPartition() const; u64 GetProgramTitleID() const; + u32 GetSystemUpdateVersion(); + u64 GetSystemUpdateTitleID() const; bool HasProgramNCA() const; VirtualFile GetProgramNCAFile() const; @@ -120,6 +122,8 @@ private: std::shared_ptr<NCA> program; std::vector<std::shared_ptr<NCA>> ncas; + u64 update_normal_partition_end; + Core::Crypto::KeyManager keys; }; } // namespace FileSys |