diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-01-15 21:56:32 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-01-15 22:00:29 +0100 |
commit | 318bf7c8e3a31d444fa0308804b4c1cf0c2470be (patch) | |
tree | 0a44dcb9aac9bdf6ee4552a44ace1ad1338f2e38 /src/core/file_sys/content_archive.h | |
parent | Merge pull request #2020 from otaviopace/remove-spaces (diff) | |
download | yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.tar yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.tar.gz yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.tar.bz2 yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.tar.lz yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.tar.xz yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.tar.zst yuzu-318bf7c8e3a31d444fa0308804b4c1cf0c2470be.zip |
Diffstat (limited to 'src/core/file_sys/content_archive.h')
-rw-r--r-- | src/core/file_sys/content_archive.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index 99294cbb4..5d4d05c82 100644 --- a/src/core/file_sys/content_archive.h +++ b/src/core/file_sys/content_archive.h @@ -74,6 +74,13 @@ inline bool IsDirectoryExeFS(const std::shared_ptr<VfsDirectory>& pfs) { return pfs->GetFile("main") != nullptr && pfs->GetFile("main.npdm") != nullptr; } +inline bool IsDirectoryLogoPartition(const VirtualDir& pfs) { + // NintendoLogo is the static image in the top left corner while StartupMovie is the animation + // in the bottom right corner. + return pfs->GetFile("NintendoLogo.png") != nullptr && + pfs->GetFile("StartupMovie.gif") != nullptr; +} + // An implementation of VfsDirectory that represents a Nintendo Content Archive (NCA) conatiner. // After construction, use GetStatus to determine if the file is valid and ready to be used. class NCA : public ReadOnlyVfsDirectory { @@ -102,6 +109,8 @@ public: // Returns the base ivfc offset used in BKTR patching. u64 GetBaseIVFCOffset() const; + VirtualDir GetLogoPartition() const; + private: bool CheckSupportedNCA(const NCAHeader& header); bool HandlePotentialHeaderDecryption(); @@ -122,6 +131,7 @@ private: VirtualFile romfs = nullptr; VirtualDir exefs = nullptr; + VirtualDir logo = nullptr; VirtualFile file; VirtualFile bktr_base_romfs; u64 ivfc_offset = 0; |