summaryrefslogtreecommitdiff
path: root/src/core/loader/ncch.cpp
diff options
context:
space:
mode:
authorGravatar Subv2017-09-23 20:32:18 -0500
committerGravatar Subv2017-09-25 09:45:02 -0500
commit774e7deae8655a6f09530770c56ae2e75d55309b (patch)
tree897ebb18a3cff721f402d0be73559f4694d4b1d8 /src/core/loader/ncch.cpp
parentMerge pull request #2952 from MerryMage/page-tables (diff)
downloadyuzu-774e7deae8655a6f09530770c56ae2e75d55309b.tar.gz
yuzu-774e7deae8655a6f09530770c56ae2e75d55309b.tar.xz
yuzu-774e7deae8655a6f09530770c56ae2e75d55309b.zip
HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.
The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session. When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc). 3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
Diffstat (limited to 'src/core/loader/ncch.cpp')
-rw-r--r--src/core/loader/ncch.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp
index c46d7cfc6..5107135f9 100644
--- a/src/core/loader/ncch.cpp
+++ b/src/core/loader/ncch.cpp
@@ -187,8 +187,7 @@ ResultStatus AppLoader_NCCH::Load() {
187 if (ResultStatus::Success != result) 187 if (ResultStatus::Success != result)
188 return result; 188 return result;
189 189
190 Service::FS::RegisterArchiveType(std::make_unique<FileSys::ArchiveFactory_SelfNCCH>(*this), 190 Service::FS::RegisterSelfNCCH(*this);
191 Service::FS::ArchiveIdCode::SelfNCCH);
192 191
193 ParseRegionLockoutInfo(); 192 ParseRegionLockoutInfo();
194 193