diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-09-16 22:59:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 22:59:44 +0200 |
commit | b0ae8265ea0aea16bfe37dce96cc3f758fd35feb (patch) | |
tree | 735e838e0e271449cecaedc6977c1831c9e39a3a /src/core/loader/deconstructed_rom_directory.cpp | |
parent | Merge pull request #4658 from lioncash/copy3 (diff) | |
parent | core/loader: Remove dependencies on the global system instance (diff) | |
download | yuzu-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.cpp | 16 |
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)); } |