summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/apm
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-01 16:38:20 +0100
committerGitHub <noreply@github.com>2023-03-01 16:38:20 +0100
commit97f7a560f3905a1dd6a4e5a0a308ea752004bf08 (patch)
treee60a69f96d16d051220b66e90906a7abeacf1064 /src/core/hle/service/apm
parentMerge pull request #9879 from zhaobot/tx-update-20230301024940 (diff)
parentsm:: fix lingering session initialization issues (diff)
downloadyuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.gz
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.bz2
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.lz
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.xz
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.zst
yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/apm/apm.cpp20
-rw-r--r--src/core/hle/service/apm/apm.h3
2 files changed, 13 insertions, 10 deletions
diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp
index 44b2927a6..c23ff293d 100644
--- a/src/core/hle/service/apm/apm.cpp
+++ b/src/core/hle/service/apm/apm.cpp
@@ -4,20 +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: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
diff --git a/src/core/hle/service/apm/apm.h b/src/core/hle/service/apm/apm.h
index 0fecc766a..e188b4e44 100644
--- a/src/core/hle/service/apm/apm.h
+++ b/src/core/hle/service/apm/apm.h
@@ -15,7 +15,6 @@ public:
~Module();
};
-/// Registers all AM services with the specified service manager.
-void InstallInterfaces(Core::System& system);
+void LoopProcess(Core::System& system);
} // namespace Service::APM