summaryrefslogtreecommitdiff
path: root/src/core/loader/xci.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-09-16 08:19:25 -0400
committerGravatar Lioncash2020-09-16 08:46:59 -0400
commit113a3972a6487430ab94f08a4a66742739ff48c2 (patch)
tree735e838e0e271449cecaedc6977c1831c9e39a3a /src/core/loader/xci.cpp
parentMerge pull request #4658 from lioncash/copy3 (diff)
downloadyuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.gz
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.xz
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.zip
core/loader: Remove dependencies on the global system instance
Now all that remains is: 18 instances in file_sys code 14 instances in GDB stub code (this can be tossed wholesale) 4 instances in HLE code 2 instances in settings code.
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;