summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ldr
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-11-27 06:41:56 +0100
committerGitHub <noreply@github.com>2020-11-27 06:41:56 +0100
commitee5e77fbf97da699e5ded623c12cad56dd7ce0da (patch)
tree66940e6456e66688af258d1e56d846eedd82d5b6 /src/core/hle/service/ldr
parentMerge pull request #5016 from comex/xx-push (diff)
parentservice: Eliminate usages of the global system instance (diff)
downloadyuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.tar
yuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.tar.gz
yuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.tar.bz2
yuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.tar.lz
yuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.tar.xz
yuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.tar.zst
yuzu-ee5e77fbf97da699e5ded623c12cad56dd7ce0da.zip
Diffstat (limited to 'src/core/hle/service/ldr')
-rw-r--r--src/core/hle/service/ldr/ldr.cpp15
-rw-r--r--src/core/hle/service/ldr/ldr.h4
2 files changed, 11 insertions, 8 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 65c209725..fff68326b 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -115,7 +115,7 @@ static_assert(sizeof(NROInfo) == 0x60, "NROInfo has invalid size.");
class DebugMonitor final : public ServiceFramework<DebugMonitor> {
public:
- explicit DebugMonitor() : ServiceFramework{"ldr:dmnt"} {
+ explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "ldr:dmnt"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "AddProcessToDebugLaunchQueue"},
@@ -130,7 +130,7 @@ public:
class ProcessManager final : public ServiceFramework<ProcessManager> {
public:
- explicit ProcessManager() : ServiceFramework{"ldr:pm"} {
+ explicit ProcessManager(Core::System& system_) : ServiceFramework{system_, "ldr:pm"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "CreateProcess"},
@@ -147,7 +147,7 @@ public:
class Shell final : public ServiceFramework<Shell> {
public:
- explicit Shell() : ServiceFramework{"ldr:shel"} {
+ explicit Shell(Core::System& system_) : ServiceFramework{system_, "ldr:shel"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "AddProcessToLaunchQueue"},
@@ -161,7 +161,7 @@ public:
class RelocatableObject final : public ServiceFramework<RelocatableObject> {
public:
- explicit RelocatableObject(Core::System& system) : ServiceFramework{"ldr:ro"}, system(system) {
+ explicit RelocatableObject(Core::System& system_) : ServiceFramework{system_, "ldr:ro"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &RelocatableObject::LoadNro, "LoadNro"},
@@ -639,13 +639,12 @@ private:
Common::Is4KBAligned(header.segment_headers[RO_INDEX].memory_size) &&
Common::Is4KBAligned(header.segment_headers[DATA_INDEX].memory_size);
}
- Core::System& system;
};
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
- std::make_shared<DebugMonitor>()->InstallAsService(sm);
- std::make_shared<ProcessManager>()->InstallAsService(sm);
- std::make_shared<Shell>()->InstallAsService(sm);
+ std::make_shared<DebugMonitor>(system)->InstallAsService(sm);
+ std::make_shared<ProcessManager>(system)->InstallAsService(sm);
+ std::make_shared<Shell>(system)->InstallAsService(sm);
std::make_shared<RelocatableObject>(system)->InstallAsService(sm);
}
diff --git a/src/core/hle/service/ldr/ldr.h b/src/core/hle/service/ldr/ldr.h
index 7ac8c0b65..104fc15c5 100644
--- a/src/core/hle/service/ldr/ldr.h
+++ b/src/core/hle/service/ldr/ldr.h
@@ -4,6 +4,10 @@
#pragma once
+namespace Core {
+class System;
+}
+
namespace Service::SM {
class ServiceManager;
}