diff options
| author | 2023-02-18 16:26:48 -0500 | |
|---|---|---|
| committer | 2023-02-21 12:19:25 -0500 | |
| commit | a9369726147c7499e0016e183d5d56a7b44efe4b (patch) | |
| tree | c1d1b4a9fdafd92863c0922b05d72c14de83ffa7 /src/core/hle/service/bpc | |
| parent | core: defer cpu shutdown (diff) | |
| download | yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.gz yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.tar.xz yuzu-a9369726147c7499e0016e183d5d56a7b44efe4b.zip | |
service: refactor server architecture
Converts services to have their own processes
Diffstat (limited to 'src/core/hle/service/bpc')
| -rw-r--r-- | src/core/hle/service/bpc/bpc.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/bpc/bpc.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/core/hle/service/bpc/bpc.cpp b/src/core/hle/service/bpc/bpc.cpp index 466163538..91b15e256 100644 --- a/src/core/hle/service/bpc/bpc.cpp +++ b/src/core/hle/service/bpc/bpc.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | 5 | ||
| 6 | #include "core/hle/service/bpc/bpc.h" | 6 | #include "core/hle/service/bpc/bpc.h" |
| 7 | #include "core/hle/service/server_manager.h" | ||
| 7 | #include "core/hle/service/service.h" | 8 | #include "core/hle/service/service.h" |
| 8 | #include "core/hle/service/sm/sm.h" | ||
| 9 | 9 | ||
| 10 | namespace Service::BPC { | 10 | namespace Service::BPC { |
| 11 | 11 | ||
| @@ -54,9 +54,12 @@ public: | |||
| 54 | } | 54 | } |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 57 | void LoopProcess(Core::System& system) { |
| 58 | std::make_shared<BPC>(system)->InstallAsService(sm); | 58 | auto server_manager = std::make_unique<ServerManager>(system); |
| 59 | std::make_shared<BPC_R>(system)->InstallAsService(sm); | 59 | |
| 60 | server_manager->RegisterNamedService("bpc", std::make_shared<BPC>(system)); | ||
| 61 | server_manager->RegisterNamedService("bpc:r", std::make_shared<BPC_R>(system)); | ||
| 62 | ServerManager::RunServer(std::move(server_manager)); | ||
| 60 | } | 63 | } |
| 61 | 64 | ||
| 62 | } // namespace Service::BPC | 65 | } // namespace Service::BPC |
diff --git a/src/core/hle/service/bpc/bpc.h b/src/core/hle/service/bpc/bpc.h index 8adc2f962..524391ddb 100644 --- a/src/core/hle/service/bpc/bpc.h +++ b/src/core/hle/service/bpc/bpc.h | |||
| @@ -13,6 +13,6 @@ class ServiceManager; | |||
| 13 | 13 | ||
| 14 | namespace Service::BPC { | 14 | namespace Service::BPC { |
| 15 | 15 | ||
| 16 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | 16 | void LoopProcess(Core::System& system); |
| 17 | 17 | ||
| 18 | } // namespace Service::BPC | 18 | } // namespace Service::BPC |