summaryrefslogtreecommitdiffstats
path: root/src/core/loader/deconstructed_rom_directory.cpp
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-09-16 22:59:44 +0200
committerGitHub <noreply@github.com>2020-09-16 22:59:44 +0200
commitb0ae8265ea0aea16bfe37dce96cc3f758fd35feb (patch)
tree735e838e0e271449cecaedc6977c1831c9e39a3a /src/core/loader/deconstructed_rom_directory.cpp
parentMerge pull request #4658 from lioncash/copy3 (diff)
parentcore/loader: Remove dependencies on the global system instance (diff)
downloadyuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar
yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar.gz
yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar.bz2
yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar.lz
yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar.xz
yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar.zst
yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.zip
Diffstat (limited to 'src/core/loader/deconstructed_rom_directory.cpp')
-rw-r--r--src/core/loader/deconstructed_rom_directory.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp
index 134e83412..56dda425c 100644
--- a/src/core/loader/deconstructed_rom_directory.cpp
+++ b/src/core/loader/deconstructed_rom_directory.cpp
@@ -89,7 +89,7 @@ FileType AppLoader_DeconstructedRomDirectory::IdentifyType(const FileSys::Virtua
}
AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirectory::Load(
- Kernel::Process& process) {
+ Kernel::Process& process, Core::System& system) {
if (is_loaded) {
return {ResultStatus::ErrorAlreadyLoaded, {}};
}
@@ -141,9 +141,9 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
continue;
}
- const bool should_pass_arguments{std::strcmp(module, "rtld") == 0};
- const auto tentative_next_load_addr{AppLoader_NSO::LoadModule(
- process, *module_file, code_size, should_pass_arguments, false)};
+ const bool should_pass_arguments = std::strcmp(module, "rtld") == 0;
+ const auto tentative_next_load_addr = AppLoader_NSO::LoadModule(
+ process, system, *module_file, code_size, should_pass_arguments, false);
if (!tentative_next_load_addr) {
return {ResultStatus::ErrorLoadingNSO, {}};
}
@@ -168,9 +168,9 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
}
const VAddr load_addr{next_load_addr};
- const bool should_pass_arguments{std::strcmp(module, "rtld") == 0};
- const auto tentative_next_load_addr{AppLoader_NSO::LoadModule(
- process, *module_file, load_addr, should_pass_arguments, true, pm)};
+ const bool should_pass_arguments = std::strcmp(module, "rtld") == 0;
+ const auto tentative_next_load_addr = AppLoader_NSO::LoadModule(
+ process, system, *module_file, load_addr, should_pass_arguments, true, pm);
if (!tentative_next_load_addr) {
return {ResultStatus::ErrorLoadingNSO, {}};
}
@@ -192,7 +192,7 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
// Register the RomFS if a ".romfs" file was found
if (romfs_iter != files.end() && *romfs_iter != nullptr) {
romfs = *romfs_iter;
- Core::System::GetInstance().GetFileSystemController().RegisterRomFS(
+ system.GetFileSystemController().RegisterRomFS(
std::make_unique<FileSys::RomFSFactory>(*this));
}