summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nca.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-01-15 21:56:52 +0100
committerZach Hilman <zachhilman@gmail.com>2019-01-15 22:01:04 +0100
commitb273b195762433ab015ec015061414aac4b9683e (patch)
treeb1c7aefc989d3174099eeafd7ba8a9d0ac28d230 /src/core/loader/nca.cpp
parentcontent_archive: Add getter for logo section of NCA (diff)
downloadyuzu-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.cpp19
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