diff options
Diffstat (limited to 'src/core/loader/xci.cpp')
-rw-r--r-- | src/core/loader/xci.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index 461607c95..89f7bbf77 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp @@ -120,4 +120,29 @@ ResultStatus AppLoader_XCI::ReadTitle(std::string& title) { title = nacp_file->GetApplicationName(); return ResultStatus::Success; } + +ResultStatus AppLoader_XCI::ReadControlData(FileSys::NACP& control) { + if (nacp_file == nullptr) + return ResultStatus::ErrorNoControl; + control = *nacp_file; + return ResultStatus::Success; +} + +ResultStatus AppLoader_XCI::ReadManualRomFS(FileSys::VirtualFile& file) { + const auto nca = xci->GetSecurePartitionNSP()->GetNCA(xci->GetProgramTitleID(), + FileSys::ContentRecordType::Manual); + if (xci->GetStatus() != ResultStatus::Success || nca == nullptr) + return ResultStatus::ErrorXCIMissingPartition; + file = nca->GetRomFS(); + return file == nullptr ? ResultStatus::ErrorNoRomFS : ResultStatus::Success; +} + +ResultStatus AppLoader_XCI::ReadBanner(std::vector<u8>& buffer) { + return nca_loader->ReadBanner(buffer); +} + +ResultStatus AppLoader_XCI::ReadLogo(std::vector<u8>& buffer) { + return nca_loader->ReadLogo(buffer); +} + } // namespace Loader |