summaryrefslogtreecommitdiff
path: root/src/core/loader/xci.cpp
diff options
context:
space:
mode:
authorGravatar Rodrigo Locatti2020-09-16 20:59:44 +0000
committerGravatar GitHub2020-09-16 20:59:44 +0000
commitb0ae8265ea0aea16bfe37dce96cc3f758fd35feb (patch)
tree735e838e0e271449cecaedc6977c1831c9e39a3a /src/core/loader/xci.cpp
parentMerge pull request #4658 from lioncash/copy3 (diff)
parentcore/loader: Remove dependencies on the global system instance (diff)
downloadyuzu-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/xci.cpp')
-rw-r--r--src/core/loader/xci.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index 7186ad1ff..25e83af0f 100644
--- a/src/core/loader/xci.cpp
+++ b/src/core/loader/xci.cpp
@@ -49,7 +49,7 @@ FileType AppLoader_XCI::IdentifyType(const FileSys::VirtualFile& file) {
49 return FileType::Error; 49 return FileType::Error;
50} 50}
51 51
52AppLoader_XCI::LoadResult AppLoader_XCI::Load(Kernel::Process& process) { 52AppLoader_XCI::LoadResult AppLoader_XCI::Load(Kernel::Process& process, Core::System& system) {
53 if (is_loaded) { 53 if (is_loaded) {
54 return {ResultStatus::ErrorAlreadyLoaded, {}}; 54 return {ResultStatus::ErrorAlreadyLoaded, {}};
55 } 55 }
@@ -66,15 +66,14 @@ AppLoader_XCI::LoadResult AppLoader_XCI::Load(Kernel::Process& process) {
66 return {ResultStatus::ErrorMissingProductionKeyFile, {}}; 66 return {ResultStatus::ErrorMissingProductionKeyFile, {}};
67 } 67 }
68 68
69 const auto result = nca_loader->Load(process); 69 const auto result = nca_loader->Load(process, system);
70 if (result.first != ResultStatus::Success) { 70 if (result.first != ResultStatus::Success) {
71 return result; 71 return result;
72 } 72 }
73 73
74 FileSys::VirtualFile update_raw; 74 FileSys::VirtualFile update_raw;
75 if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) { 75 if (ReadUpdateRaw(update_raw) == ResultStatus::Success && update_raw != nullptr) {
76 Core::System::GetInstance().GetFileSystemController().SetPackedUpdate( 76 system.GetFileSystemController().SetPackedUpdate(std::move(update_raw));
77 std::move(update_raw));
78 } 77 }
79 78
80 is_loaded = true; 79 is_loaded = true;