diff options
Diffstat (limited to 'src/core/loader')
-rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 14 | ||||
-rw-r--r-- | src/core/loader/nca.cpp | 6 | ||||
-rw-r--r-- | src/core/loader/nro.cpp | 6 | ||||
-rw-r--r-- | src/core/loader/nsp.cpp | 3 | ||||
-rw-r--r-- | src/core/loader/xci.cpp | 3 |
5 files changed, 12 insertions, 20 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index c9f8707b7..1e599e78b 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp @@ -216,20 +216,6 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect LOG_DEBUG(Loader, "loaded module {} @ {:#X}", module, load_addr); } - // Find the RomFS by searching for a ".romfs" file in this directory - const auto& files = dir->GetFiles(); - const auto romfs_iter = - std::find_if(files.begin(), files.end(), [](const FileSys::VirtualFile& f) { - return f->GetName().find(".romfs") != std::string::npos; - }); - - // Register the RomFS if a ".romfs" file was found - if (romfs_iter != files.end() && *romfs_iter != nullptr) { - romfs = *romfs_iter; - system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>( - *this, system.GetContentProvider(), system.GetFileSystemController())); - } - is_loaded = true; return {ResultStatus::Success, LoadParameters{metadata.GetMainThreadPriority(), metadata.GetMainThreadStackSize()}}; diff --git a/src/core/loader/nca.cpp b/src/core/loader/nca.cpp index 814407535..2a32b1276 100644 --- a/src/core/loader/nca.cpp +++ b/src/core/loader/nca.cpp @@ -74,8 +74,10 @@ AppLoader_NCA::LoadResult AppLoader_NCA::Load(Kernel::KProcess& process, Core::S return load_result; } - system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>( - *this, system.GetContentProvider(), system.GetFileSystemController())); + system.GetFileSystemController().RegisterProcess( + process.GetProcessId(), nca->GetTitleId(), + std::make_shared<FileSys::RomFSFactory>(*this, system.GetContentProvider(), + system.GetFileSystemController())); is_loaded = true; return load_result; diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index e74697cda..83371fcbd 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -276,8 +276,10 @@ AppLoader_NRO::LoadResult AppLoader_NRO::Load(Kernel::KProcess& process, Core::S } if (romfs != nullptr) { - system.GetFileSystemController().RegisterRomFS(std::make_unique<FileSys::RomFSFactory>( - *this, system.GetContentProvider(), system.GetFileSystemController())); + system.GetFileSystemController().RegisterProcess( + process.GetProcessId(), {}, + std::make_unique<FileSys::RomFSFactory>(*this, system.GetContentProvider(), + system.GetFileSystemController())); } is_loaded = true; diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp index f4ab75b77..28116ff3a 100644 --- a/src/core/loader/nsp.cpp +++ b/src/core/loader/nsp.cpp @@ -111,7 +111,8 @@ AppLoader_NSP::LoadResult AppLoader_NSP::Load(Kernel::KProcess& process, Core::S FileSys::VirtualFile update_raw; if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) { - system.GetFileSystemController().SetPackedUpdate(std::move(update_raw)); + system.GetFileSystemController().SetPackedUpdate(process.GetProcessId(), + std::move(update_raw)); } is_loaded = true; diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index 12d72c380..e9abb199a 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp @@ -78,7 +78,8 @@ AppLoader_XCI::LoadResult AppLoader_XCI::Load(Kernel::KProcess& process, Core::S FileSys::VirtualFile update_raw; if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) { - system.GetFileSystemController().SetPackedUpdate(std::move(update_raw)); + system.GetFileSystemController().SetPackedUpdate(process.GetProcessId(), + std::move(update_raw)); } is_loaded = true; |