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.
This commit is contained in:
parent
d881dee818
commit
774e7deae8
6 changed files with 66 additions and 19 deletions
|
@ -187,8 +187,7 @@ ResultStatus AppLoader_NCCH::Load() {
|
|||
if (ResultStatus::Success != result)
|
||||
return result;
|
||||
|
||||
Service::FS::RegisterArchiveType(std::make_unique<FileSys::ArchiveFactory_SelfNCCH>(*this),
|
||||
Service::FS::ArchiveIdCode::SelfNCCH);
|
||||
Service::FS::RegisterSelfNCCH(*this);
|
||||
|
||||
ParseRegionLockoutInfo();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue