diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-09-04 00:57:52 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-04 22:25:10 +0200 |
commit | 23a16c1720ee522f6ac7d1f426a2d4a918ce41c9 (patch) | |
tree | 43a69cb7046a768760e5ae20eddfe3b53d3ca7f8 /src/core/loader/nsp.cpp | |
parent | nsp: Fix error masking issue with XCI files (diff) | |
download | yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.tar yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.tar.gz yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.tar.bz2 yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.tar.lz yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.tar.xz yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.tar.zst yuzu-23a16c1720ee522f6ac7d1f426a2d4a918ce41c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/nsp.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp index 7c06239f2..291a9876d 100644 --- a/src/core/loader/nsp.cpp +++ b/src/core/loader/nsp.cpp @@ -9,6 +9,8 @@ #include "core/file_sys/content_archive.h" #include "core/file_sys/control_metadata.h" #include "core/file_sys/nca_metadata.h" +#include "core/file_sys/patch_manager.h" +#include "core/file_sys/registered_cache.h" #include "core/file_sys/romfs.h" #include "core/file_sys/submission_package.h" #include "core/hle/kernel/process.h" @@ -28,24 +30,12 @@ AppLoader_NSP::AppLoader_NSP(FileSys::VirtualFile file) return; const auto control_nca = - nsp->GetNCA(nsp->GetFirstTitleID(), FileSys::ContentRecordType::Control); + nsp->GetNCA(nsp->GetProgramTitleID(), FileSys::ContentRecordType::Control); if (control_nca == nullptr || control_nca->GetStatus() != ResultStatus::Success) return; - const auto romfs = FileSys::ExtractRomFS(control_nca->GetRomFS()); - if (romfs == nullptr) - return; - - for (const auto& language : FileSys::LANGUAGE_NAMES) { - icon_file = romfs->GetFile("icon_" + std::string(language) + ".dat"); - if (icon_file != nullptr) - break; - } - - const auto nacp_raw = romfs->GetFile("control.nacp"); - if (nacp_raw == nullptr) - return; - nacp_file = std::make_shared<FileSys::NACP>(nacp_raw); + std::tie(nacp_file, icon_file) = + FileSys::PatchManager(nsp->GetProgramTitleID()).ParseControlNCA(control_nca); } AppLoader_NSP::~AppLoader_NSP() = default; |