summaryrefslogtreecommitdiff
path: root/src/core/hle/service/pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/pm')
-rw-r--r--src/core/hle/service/pm/pm.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index a771a51b4..68736c40c 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -44,7 +44,7 @@ void GetApplicationPidGeneric(Kernel::HLERequestContext& ctx,
44 44
45class BootMode final : public ServiceFramework<BootMode> { 45class BootMode final : public ServiceFramework<BootMode> {
46public: 46public:
47 explicit BootMode() : ServiceFramework{"pm:bm"} { 47 explicit BootMode(Core::System& system_) : ServiceFramework{system_, "pm:bm"} {
48 static const FunctionInfo functions[] = { 48 static const FunctionInfo functions[] = {
49 {0, &BootMode::GetBootMode, "GetBootMode"}, 49 {0, &BootMode::GetBootMode, "GetBootMode"},
50 {1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"}, 50 {1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"},
@@ -75,8 +75,8 @@ private:
75 75
76class DebugMonitor final : public ServiceFramework<DebugMonitor> { 76class DebugMonitor final : public ServiceFramework<DebugMonitor> {
77public: 77public:
78 explicit DebugMonitor(const Kernel::KernelCore& kernel) 78 explicit DebugMonitor(Core::System& system_)
79 : ServiceFramework{"pm:dmnt"}, kernel(kernel) { 79 : ServiceFramework{system_, "pm:dmnt"}, kernel{system_.Kernel()} {
80 // clang-format off 80 // clang-format off
81 static const FunctionInfo functions[] = { 81 static const FunctionInfo functions[] = {
82 {0, nullptr, "GetJitDebugProcessIdList"}, 82 {0, nullptr, "GetJitDebugProcessIdList"},
@@ -125,8 +125,9 @@ private:
125 125
126class Info final : public ServiceFramework<Info> { 126class Info final : public ServiceFramework<Info> {
127public: 127public:
128 explicit Info(const std::vector<std::shared_ptr<Kernel::Process>>& process_list) 128 explicit Info(Core::System& system_,
129 : ServiceFramework{"pm:info"}, process_list(process_list) { 129 const std::vector<std::shared_ptr<Kernel::Process>>& process_list_)
130 : ServiceFramework{system_, "pm:info"}, process_list{process_list_} {
130 static const FunctionInfo functions[] = { 131 static const FunctionInfo functions[] = {
131 {0, &Info::GetTitleId, "GetTitleId"}, 132 {0, &Info::GetTitleId, "GetTitleId"},
132 }; 133 };
@@ -160,8 +161,8 @@ private:
160 161
161class Shell final : public ServiceFramework<Shell> { 162class Shell final : public ServiceFramework<Shell> {
162public: 163public:
163 explicit Shell(const Kernel::KernelCore& kernel) 164 explicit Shell(Core::System& system_)
164 : ServiceFramework{"pm:shell"}, kernel(kernel) { 165 : ServiceFramework{system_, "pm:shell"}, kernel{system_.Kernel()} {
165 // clang-format off 166 // clang-format off
166 static const FunctionInfo functions[] = { 167 static const FunctionInfo functions[] = {
167 {0, nullptr, "LaunchProgram"}, 168 {0, nullptr, "LaunchProgram"},
@@ -190,11 +191,11 @@ private:
190}; 191};
191 192
192void InstallInterfaces(Core::System& system) { 193void InstallInterfaces(Core::System& system) {
193 std::make_shared<BootMode>()->InstallAsService(system.ServiceManager()); 194 std::make_shared<BootMode>(system)->InstallAsService(system.ServiceManager());
194 std::make_shared<DebugMonitor>(system.Kernel())->InstallAsService(system.ServiceManager()); 195 std::make_shared<DebugMonitor>(system)->InstallAsService(system.ServiceManager());
195 std::make_shared<Info>(system.Kernel().GetProcessList()) 196 std::make_shared<Info>(system, system.Kernel().GetProcessList())
196 ->InstallAsService(system.ServiceManager()); 197 ->InstallAsService(system.ServiceManager());
197 std::make_shared<Shell>(system.Kernel())->InstallAsService(system.ServiceManager()); 198 std::make_shared<Shell>(system)->InstallAsService(system.ServiceManager());
198} 199}
199 200
200} // namespace Service::PM 201} // namespace Service::PM