summaryrefslogtreecommitdiff
path: root/src/core/loader/nca.cpp
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-01-15 15:56:52 -0500
committerGravatar Zach Hilman2019-01-15 16:01:04 -0500
commitb273b195762433ab015ec015061414aac4b9683e (patch)
treeb1c7aefc989d3174099eeafd7ba8a9d0ac28d230 /src/core/loader/nca.cpp
parentcontent_archive: Add getter for logo section of NCA (diff)
downloadyuzu-b273b195762433ab015ec015061414aac4b9683e.tar.gz
yuzu-b273b195762433ab015ec015061414aac4b9683e.tar.xz
yuzu-b273b195762433ab015ec015061414aac4b9683e.zip
loader: Propagate NCA logo section to ReadBanner and ReadLogo
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) {
84 return ResultStatus::Success; 84 return ResultStatus::Success;
85} 85}
86 86
87ResultStatus AppLoader_NCA::ReadBanner(std::vector<u8>& buffer) {
88 if (nca == nullptr || nca->GetStatus() != ResultStatus::Success)
89 return ResultStatus::ErrorNotInitialized;
90 const auto logo = nca->GetLogoPartition();
91 if (logo == nullptr)
92 return ResultStatus::ErrorNoIcon;
93 buffer = logo->GetFile("StartupMovie.gif")->ReadAllBytes();
94 return ResultStatus::Success;
95}
96
97ResultStatus AppLoader_NCA::ReadLogo(std::vector<u8>& buffer) {
98 if (nca == nullptr || nca->GetStatus() != ResultStatus::Success)
99 return ResultStatus::ErrorNotInitialized;
100 const auto logo = nca->GetLogoPartition();
101 if (logo == nullptr)
102 return ResultStatus::ErrorNoIcon;
103 buffer = logo->GetFile("NintendoLogo.png")->ReadAllBytes();
104 return ResultStatus::Success;
105}
87} // namespace Loader 106} // namespace Loader