summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-18 22:26:48 +0100
committerLiam <byteslice@airmail.cc>2023-02-21 18:19:25 +0100
commita9369726147c7499e0016e183d5d56a7b44efe4b (patch)
treec1d1b4a9fdafd92863c0922b05d72c14de83ffa7 /src/core/hle/service/am
parentcore: defer cpu shutdown (diff)
downloadyuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.gz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.bz2
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.lz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.xz
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.zst
yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.zip
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/am.cpp19
-rw-r--r--src/core/hle/service/am/am.h4
2 files changed, 13 insertions, 10 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index beb2da06e..979881512 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -32,6 +32,7 @@
#include "core/hle/service/ns/ns.h"
#include "core/hle/service/nvflinger/nvflinger.h"
#include "core/hle/service/pm/pm.h"
+#include "core/hle/service/server_manager.h"
#include "core/hle/service/sm/sm.h"
#include "core/hle/service/vi/vi.h"
#include "core/memory.h"
@@ -1828,17 +1829,21 @@ void IApplicationFunctions::PrepareForJit(Kernel::HLERequestContext& ctx) {
rb.Push(ResultSuccess);
}
-void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger& nvflinger,
- Core::System& system) {
+void LoopProcess(NVFlinger::NVFlinger& nvflinger, Core::System& system) {
auto message_queue = std::make_shared<AppletMessageQueue>(system);
// Needed on game boot
message_queue->PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged);
- std::make_shared<AppletAE>(nvflinger, message_queue, system)->InstallAsService(service_manager);
- std::make_shared<AppletOE>(nvflinger, message_queue, system)->InstallAsService(service_manager);
- std::make_shared<IdleSys>(system)->InstallAsService(service_manager);
- std::make_shared<OMM>(system)->InstallAsService(service_manager);
- std::make_shared<SPSM>(system)->InstallAsService(service_manager);
+ auto server_manager = std::make_unique<ServerManager>(system);
+
+ server_manager->RegisterNamedService(
+ "appletAE", std::make_shared<AppletAE>(nvflinger, message_queue, system));
+ server_manager->RegisterNamedService(
+ "appletOE", std::make_shared<AppletOE>(nvflinger, message_queue, system));
+ server_manager->RegisterNamedService("idle:sys", std::make_shared<IdleSys>(system));
+ server_manager->RegisterNamedService("omm", std::make_shared<OMM>(system));
+ server_manager->RegisterNamedService("spsm", std::make_shared<SPSM>(system));
+ ServerManager::RunServer(std::move(server_manager));
}
IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_)
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index a0fbfcfc5..79e2263d7 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -396,8 +396,6 @@ public:
~IProcessWindingController() override;
};
-/// Registers all AM services with the specified service manager.
-void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger& nvflinger,
- Core::System& system);
+void LoopProcess(NVFlinger::NVFlinger& nvflinger, Core::System& system);
} // namespace Service::AM