diff options
author | Liam <byteslice@airmail.cc> | 2023-02-18 22:26:48 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-02-21 18:19:25 +0100 |
commit | a9369726147c7499e0016e183d5d56a7b44efe4b (patch) | |
tree | c1d1b4a9fdafd92863c0922b05d72c14de83ffa7 /src/core/hle/service/ns | |
parent | core: defer cpu shutdown (diff) | |
download | yuzu-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/ns')
-rw-r--r-- | src/core/hle/service/ns/ns.cpp | 38 | ||||
-rw-r--r-- | src/core/hle/service/ns/ns.h | 3 |
2 files changed, 22 insertions, 19 deletions
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index f59a1a63d..a9291ed5d 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -14,6 +14,7 @@ #include "core/hle/service/ns/language.h" #include "core/hle/service/ns/ns.h" #include "core/hle/service/ns/pdm_qry.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/set/set.h" namespace Service::NS { @@ -777,23 +778,26 @@ private: } }; -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { - - std::make_shared<NS>("ns:am2", system)->InstallAsService(service_manager); - std::make_shared<NS>("ns:ec", system)->InstallAsService(service_manager); - std::make_shared<NS>("ns:rid", system)->InstallAsService(service_manager); - std::make_shared<NS>("ns:rt", system)->InstallAsService(service_manager); - std::make_shared<NS>("ns:web", system)->InstallAsService(service_manager); - std::make_shared<NS>("ns:ro", system)->InstallAsService(service_manager); - - std::make_shared<NS_DEV>(system)->InstallAsService(service_manager); - std::make_shared<NS_SU>(system)->InstallAsService(service_manager); - std::make_shared<NS_VM>(system)->InstallAsService(service_manager); - - std::make_shared<PDM_QRY>(system)->InstallAsService(service_manager); - - std::make_shared<IPlatformServiceManager>(system, "pl:s")->InstallAsService(service_manager); - std::make_shared<IPlatformServiceManager>(system, "pl:u")->InstallAsService(service_manager); +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService("ns:am2", std::make_shared<NS>("ns:am2", system)); + server_manager->RegisterNamedService("ns:ec", std::make_shared<NS>("ns:ec", system)); + server_manager->RegisterNamedService("ns:rid", std::make_shared<NS>("ns:rid", system)); + server_manager->RegisterNamedService("ns:rt", std::make_shared<NS>("ns:rt", system)); + server_manager->RegisterNamedService("ns:web", std::make_shared<NS>("ns:web", system)); + server_manager->RegisterNamedService("ns:ro", std::make_shared<NS>("ns:ro", system)); + + server_manager->RegisterNamedService("ns:dev", std::make_shared<NS_DEV>(system)); + server_manager->RegisterNamedService("ns:su", std::make_shared<NS_SU>(system)); + server_manager->RegisterNamedService("ns:vm", std::make_shared<NS_VM>(system)); + server_manager->RegisterNamedService("pdm:qry", std::make_shared<PDM_QRY>(system)); + + server_manager->RegisterNamedService("pl:s", + std::make_shared<IPlatformServiceManager>(system, "pl:s")); + server_manager->RegisterNamedService("pl:u", + std::make_shared<IPlatformServiceManager>(system, "pl:u")); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::NS diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index 9c18e935c..797e69a13 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h @@ -117,8 +117,7 @@ private: } }; -/// Registers all NS services with the specified service manager. -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system); +void LoopProcess(Core::System& system); } // namespace NS } // namespace Service |