diff options
Diffstat (limited to 'src/core/loader/nsp.cpp')
-rw-r--r-- | src/core/loader/nsp.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp index 080d89904..7da1f8960 100644 --- a/src/core/loader/nsp.cpp +++ b/src/core/loader/nsp.cpp @@ -151,4 +151,28 @@ ResultStatus AppLoader_NSP::ReadTitle(std::string& title) { title = nacp_file->GetApplicationName(); return ResultStatus::Success; } + +ResultStatus AppLoader_NSP::ReadControlData(FileSys::NACP& nacp) { + if (nacp_file == nullptr) + return ResultStatus::ErrorNoControl; + nacp = *nacp_file; + return ResultStatus::Success; +} + +ResultStatus AppLoader_NSP::ReadManualRomFS(FileSys::VirtualFile& file) { + const auto nca = nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::Manual); + if (nsp->GetStatus() != ResultStatus::Success || nca == nullptr) + return ResultStatus::ErrorNoRomFS; + file = nca->GetRomFS(); + return file == nullptr ? ResultStatus::ErrorNoRomFS : ResultStatus::Success; +} + +ResultStatus AppLoader_NSP::ReadBanner(std::vector<u8>& buffer) { + return secondary_loader->ReadBanner(buffer); +} + +ResultStatus AppLoader_NSP::ReadLogo(std::vector<u8>& buffer) { + return secondary_loader->ReadLogo(buffer); +} + } // namespace Loader |