diff options
| author | 2019-01-15 15:56:52 -0500 | |
|---|---|---|
| committer | 2019-01-15 16:01:04 -0500 | |
| 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.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.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) { | |||
| 84 | return ResultStatus::Success; | 84 | return ResultStatus::Success; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | ResultStatus 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 | |||
| 97 | ResultStatus 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 |