diff options
| author | 2020-09-16 20:59:44 +0000 | |
|---|---|---|
| committer | 2020-09-16 20:59:44 +0000 | |
| commit | b0ae8265ea0aea16bfe37dce96cc3f758fd35feb (patch) | |
| tree | 735e838e0e271449cecaedc6977c1831c9e39a3a /src/core/loader/nsp.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.gz yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.tar.xz yuzu-b0ae8265ea0aea16bfe37dce96cc3f758fd35feb.zip | |
Merge pull request #4661 from lioncash/system-loader
core/loader: Remove dependencies on the global system instance
Diffstat (limited to 'src/core/loader/nsp.cpp')
| -rw-r--r-- | src/core/loader/nsp.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/loader/nsp.cpp b/src/core/loader/nsp.cpp index 13950fc08..15e528fa8 100644 --- a/src/core/loader/nsp.cpp +++ b/src/core/loader/nsp.cpp | |||
| @@ -71,7 +71,7 @@ FileType AppLoader_NSP::IdentifyType(const FileSys::VirtualFile& file) { | |||
| 71 | return FileType::Error; | 71 | return FileType::Error; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | AppLoader_NSP::LoadResult AppLoader_NSP::Load(Kernel::Process& process) { | 74 | AppLoader_NSP::LoadResult AppLoader_NSP::Load(Kernel::Process& process, Core::System& system) { |
| 75 | if (is_loaded) { | 75 | if (is_loaded) { |
| 76 | return {ResultStatus::ErrorAlreadyLoaded, {}}; | 76 | return {ResultStatus::ErrorAlreadyLoaded, {}}; |
| 77 | } | 77 | } |
| @@ -99,15 +99,14 @@ AppLoader_NSP::LoadResult AppLoader_NSP::Load(Kernel::Process& process) { | |||
| 99 | return {ResultStatus::ErrorNSPMissingProgramNCA, {}}; | 99 | return {ResultStatus::ErrorNSPMissingProgramNCA, {}}; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | const auto result = secondary_loader->Load(process); | 102 | const auto result = secondary_loader->Load(process, system); |
| 103 | if (result.first != ResultStatus::Success) { | 103 | if (result.first != ResultStatus::Success) { |
| 104 | return result; | 104 | return result; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | FileSys::VirtualFile update_raw; | 107 | FileSys::VirtualFile update_raw; |
| 108 | if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) { | 108 | if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) { |
| 109 | Core::System::GetInstance().GetFileSystemController().SetPackedUpdate( | 109 | system.GetFileSystemController().SetPackedUpdate(std::move(update_raw)); |
| 110 | std::move(update_raw)); | ||
| 111 | } | 110 | } |
| 112 | 111 | ||
| 113 | is_loaded = true; | 112 | is_loaded = true; |