diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/apm/apm.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp index 8a338d9b1..c23ff293d 100644 --- a/src/core/hle/service/apm/apm.cpp +++ b/src/core/hle/service/apm/apm.cpp @@ -4,22 +4,24 @@ #include "core/core.h" #include "core/hle/service/apm/apm.h" #include "core/hle/service/apm/apm_interface.h" +#include "core/hle/service/server_manager.h" namespace Service::APM { Module::Module() = default; Module::~Module() = default; -void InstallInterfaces(Core::System& system) { - auto module_ = std::make_shared<Module>(); - std::make_shared<APM>(system, module_, system.GetAPMController(), "apm") - ->InstallAsService(system.ServiceManager()); - std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:p") - ->InstallAsService(system.ServiceManager()); - std::make_shared<APM>(system, module_, system.GetAPMController(), "apm:am") - ->InstallAsService(system.ServiceManager()); - std::make_shared<APM_Sys>(system, system.GetAPMController()) - ->InstallAsService(system.ServiceManager()); +void LoopProcess(Core::System& system) { + auto module = std::make_shared<Module>(); + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService( + "apm", std::make_shared<APM>(system, module, system.GetAPMController(), "apm")); + server_manager->RegisterNamedService( + "apm:am", std::make_shared<APM>(system, module, system.GetAPMController(), "apm:am")); + server_manager->RegisterNamedService( + "apm:sys", std::make_shared<APM_Sys>(system, system.GetAPMController())); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::APM |