summaryrefslogtreecommitdiffstats
path: root/src/core/loader/nso.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-16 14:19:25 +0200
committerLioncash <mathew1800@gmail.com>2020-09-16 14:46:59 +0200
commit113a3972a6487430ab94f08a4a66742739ff48c2 (patch)
tree735e838e0e271449cecaedc6977c1831c9e39a3a /src/core/loader/nso.cpp
parentMerge pull request #4658 from lioncash/copy3 (diff)
downloadyuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.gz
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.bz2
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.lz
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.xz
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.tar.zst
yuzu-113a3972a6487430ab94f08a4a66742739ff48c2.zip
Diffstat (limited to '')
-rw-r--r--src/core/loader/nso.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp
index 575330a86..2610cea34 100644
--- a/src/core/loader/nso.cpp
+++ b/src/core/loader/nso.cpp
@@ -71,7 +71,7 @@ FileType AppLoader_NSO::IdentifyType(const FileSys::VirtualFile& file) {
return FileType::NSO;
}
-std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process,
+std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, Core::System& system,
const FileSys::VfsFile& file, VAddr load_base,
bool should_pass_arguments, bool load_into_process,
std::optional<FileSys::PatchManager> pm) {
@@ -148,7 +148,6 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process,
// Apply cheats if they exist and the program has a valid title ID
if (pm) {
- auto& system = Core::System::GetInstance();
system.SetCurrentProcessBuildID(nso_header.build_id);
const auto cheats = pm->CreateCheatList(system, nso_header.build_id);
if (!cheats.empty()) {
@@ -166,7 +165,8 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process,
return load_base + image_size;
}
-AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::Process& process) {
+AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::Process& process,
+ [[maybe_unused]] Core::System& system) {
if (is_loaded) {
return {ResultStatus::ErrorAlreadyLoaded, {}};
}
@@ -175,7 +175,7 @@ AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::Process& process) {
// Load module
const VAddr base_address = process.PageTable().GetCodeRegionStart();
- if (!LoadModule(process, *file, base_address, true, true)) {
+ if (!LoadModule(process, system, *file, base_address, true, true)) {
return {ResultStatus::ErrorLoadingNSO, {}};
}