diff options
Diffstat (limited to 'src/core/hle/service/ldr')
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/ldr/ldr.h | 4 |
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."); | |||
| 115 | 115 | ||
| 116 | class DebugMonitor final : public ServiceFramework<DebugMonitor> { | 116 | class DebugMonitor final : public ServiceFramework<DebugMonitor> { |
| 117 | public: | 117 | public: |
| 118 | explicit DebugMonitor() : ServiceFramework{"ldr:dmnt"} { | 118 | explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "ldr:dmnt"} { |
| 119 | // clang-format off | 119 | // clang-format off |
| 120 | static const FunctionInfo functions[] = { | 120 | static const FunctionInfo functions[] = { |
| 121 | {0, nullptr, "AddProcessToDebugLaunchQueue"}, | 121 | {0, nullptr, "AddProcessToDebugLaunchQueue"}, |
| @@ -130,7 +130,7 @@ public: | |||
| 130 | 130 | ||
| 131 | class ProcessManager final : public ServiceFramework<ProcessManager> { | 131 | class ProcessManager final : public ServiceFramework<ProcessManager> { |
| 132 | public: | 132 | public: |
| 133 | explicit ProcessManager() : ServiceFramework{"ldr:pm"} { | 133 | explicit ProcessManager(Core::System& system_) : ServiceFramework{system_, "ldr:pm"} { |
| 134 | // clang-format off | 134 | // clang-format off |
| 135 | static const FunctionInfo functions[] = { | 135 | static const FunctionInfo functions[] = { |
| 136 | {0, nullptr, "CreateProcess"}, | 136 | {0, nullptr, "CreateProcess"}, |
| @@ -147,7 +147,7 @@ public: | |||
| 147 | 147 | ||
| 148 | class Shell final : public ServiceFramework<Shell> { | 148 | class Shell final : public ServiceFramework<Shell> { |
| 149 | public: | 149 | public: |
| 150 | explicit Shell() : ServiceFramework{"ldr:shel"} { | 150 | explicit Shell(Core::System& system_) : ServiceFramework{system_, "ldr:shel"} { |
| 151 | // clang-format off | 151 | // clang-format off |
| 152 | static const FunctionInfo functions[] = { | 152 | static const FunctionInfo functions[] = { |
| 153 | {0, nullptr, "AddProcessToLaunchQueue"}, | 153 | {0, nullptr, "AddProcessToLaunchQueue"}, |
| @@ -161,7 +161,7 @@ public: | |||
| 161 | 161 | ||
| 162 | class RelocatableObject final : public ServiceFramework<RelocatableObject> { | 162 | class RelocatableObject final : public ServiceFramework<RelocatableObject> { |
| 163 | public: | 163 | public: |
| 164 | explicit RelocatableObject(Core::System& system) : ServiceFramework{"ldr:ro"}, system(system) { | 164 | explicit RelocatableObject(Core::System& system_) : ServiceFramework{system_, "ldr:ro"} { |
| 165 | // clang-format off | 165 | // clang-format off |
| 166 | static const FunctionInfo functions[] = { | 166 | static const FunctionInfo functions[] = { |
| 167 | {0, &RelocatableObject::LoadNro, "LoadNro"}, | 167 | {0, &RelocatableObject::LoadNro, "LoadNro"}, |
| @@ -639,13 +639,12 @@ private: | |||
| 639 | Common::Is4KBAligned(header.segment_headers[RO_INDEX].memory_size) && | 639 | Common::Is4KBAligned(header.segment_headers[RO_INDEX].memory_size) && |
| 640 | Common::Is4KBAligned(header.segment_headers[DATA_INDEX].memory_size); | 640 | Common::Is4KBAligned(header.segment_headers[DATA_INDEX].memory_size); |
| 641 | } | 641 | } |
| 642 | Core::System& system; | ||
| 643 | }; | 642 | }; |
| 644 | 643 | ||
| 645 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 644 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { |
| 646 | std::make_shared<DebugMonitor>()->InstallAsService(sm); | 645 | std::make_shared<DebugMonitor>(system)->InstallAsService(sm); |
| 647 | std::make_shared<ProcessManager>()->InstallAsService(sm); | 646 | std::make_shared<ProcessManager>(system)->InstallAsService(sm); |
| 648 | std::make_shared<Shell>()->InstallAsService(sm); | 647 | std::make_shared<Shell>(system)->InstallAsService(sm); |
| 649 | std::make_shared<RelocatableObject>(system)->InstallAsService(sm); | 648 | std::make_shared<RelocatableObject>(system)->InstallAsService(sm); |
| 650 | } | 649 | } |
| 651 | 650 | ||
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 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | namespace Core { | ||
| 8 | class System; | ||
| 9 | } | ||
| 10 | |||
| 7 | namespace Service::SM { | 11 | namespace Service::SM { |
| 8 | class ServiceManager; | 12 | class ServiceManager; |
| 9 | } | 13 | } |