mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-24 13:57:55 -05:00
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:
@ -21,6 +21,10 @@ static constexpr char SYSTEM_ID[]{"00000000000000000000000000000000"};
|
||||
/// The scrambled SD card CID, also known as ID1
|
||||
static constexpr char SDCARD_ID[]{"00000000000000000000000000000000"};
|
||||
|
||||
namespace Loader {
|
||||
class AppLoader;
|
||||
}
|
||||
|
||||
namespace Service {
|
||||
namespace FS {
|
||||
|
||||
@ -259,6 +263,9 @@ void ArchiveInit();
|
||||
/// Shutdown archives
|
||||
void ArchiveShutdown();
|
||||
|
||||
/// Registers a new NCCH file with the SelfNCCH archive factory
|
||||
void RegisterSelfNCCH(Loader::AppLoader& app_loader);
|
||||
|
||||
/// Register all archive types
|
||||
void RegisterArchiveTypes();
|
||||
|
||||
|
Reference in New Issue
Block a user