diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-01-15 21:56:52 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-01-15 22:01:04 +0100 |
commit | b273b195762433ab015ec015061414aac4b9683e (patch) | |
tree | b1c7aefc989d3174099eeafd7ba8a9d0ac28d230 /src/core/loader/nca.cpp | |
parent | content_archive: Add getter for logo section of NCA (diff) | |
download | yuzu-b273b195762433ab015ec015061414aac4b9683e.tar yuzu-b273b195762433ab015ec015061414aac4b9683e.tar.gz yuzu-b273b195762433ab015ec015061414aac4b9683e.tar.bz2 yuzu-b273b195762433ab015ec015061414aac4b9683e.tar.lz yuzu-b273b195762433ab015ec015061414aac4b9683e.tar.xz yuzu-b273b195762433ab015ec015061414aac4b9683e.tar.zst yuzu-b273b195762433ab015ec015061414aac4b9683e.zip |
Diffstat (limited to 'src/core/loader/nca.cpp')
-rw-r--r-- | src/core/loader/nca.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/loader/nca.cpp b/src/core/loader/nca.cpp index 7e1b0d84f..ce8196fcf 100644 --- a/src/core/loader/nca.cpp +++ b/src/core/loader/nca.cpp @@ -84,4 +84,23 @@ ResultStatus AppLoader_NCA::ReadProgramId(u64& out_program_id) { return ResultStatus::Success; } +ResultStatus AppLoader_NCA::ReadBanner(std::vector<u8>& buffer) { + if (nca == nullptr || nca->GetStatus() != ResultStatus::Success) + return ResultStatus::ErrorNotInitialized; + const auto logo = nca->GetLogoPartition(); + if (logo == nullptr) + return ResultStatus::ErrorNoIcon; + buffer = logo->GetFile("StartupMovie.gif")->ReadAllBytes(); + return ResultStatus::Success; +} + +ResultStatus AppLoader_NCA::ReadLogo(std::vector<u8>& buffer) { + if (nca == nullptr || nca->GetStatus() != ResultStatus::Success) + return ResultStatus::ErrorNotInitialized; + const auto logo = nca->GetLogoPartition(); + if (logo == nullptr) + return ResultStatus::ErrorNoIcon; + buffer = logo->GetFile("NintendoLogo.png")->ReadAllBytes(); + return ResultStatus::Success; +} } // namespace Loader |