diff options
author | liamwhite <[email protected]> | 2023-03-01 10:38:20 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2023-03-01 10:38:20 -0500 |
commit | 97f7a560f3905a1dd6a4e5a0a308ea752004bf08 (patch) | |
tree | e60a69f96d16d051220b66e90906a7abeacf1064 /src/core/hle/service/am/am.cpp | |
parent | da11c40849eb338bb77567eba2447398c4bab474 (diff) | |
parent | 72e5552409305fe57781b83c3145fb2b66552be2 (diff) | |
download | yuzu-android-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.gz yuzu-android-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.zip |
Merge pull request #9832 from liamwhite/hle-mp
service: HLE multiprocess
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 9a7316e27..3cd772b83 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" @@ -1830,17 +1831,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_) |