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/ptm | |
| 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/ptm')
| -rw-r--r-- | src/core/hle/service/ptm/ptm.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/ptm/ptm.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index 4bea995c6..6f0cfe04b 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp | |||
| @@ -7,12 +7,16 @@ | |||
| 7 | #include "core/hle/service/ptm/psm.h" | 7 | #include "core/hle/service/ptm/psm.h" |
| 8 | #include "core/hle/service/ptm/ptm.h" | 8 | #include "core/hle/service/ptm/ptm.h" |
| 9 | #include "core/hle/service/ptm/ts.h" | 9 | #include "core/hle/service/ptm/ts.h" |
| 10 | #include "core/hle/service/server_manager.h" | ||
| 10 | 11 | ||
| 11 | namespace Service::PTM { | 12 | namespace Service::PTM { |
| 12 | 13 | ||
| 13 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 14 | void LoopProcess(Core::System& system) { |
| 14 | std::make_shared<PSM>(system)->InstallAsService(sm); | 15 | auto server_manager = std::make_unique<ServerManager>(system); |
| 15 | std::make_shared<TS>(system)->InstallAsService(sm); | 16 | |
| 17 | server_manager->RegisterNamedService("psm", std::make_shared<PSM>(system)); | ||
| 18 | server_manager->RegisterNamedService("ts", std::make_shared<TS>(system)); | ||
| 19 | ServerManager::RunServer(std::move(server_manager)); | ||
| 16 | } | 20 | } |
| 17 | 21 | ||
| 18 | } // namespace Service::PTM | 22 | } // namespace Service::PTM |
diff --git a/src/core/hle/service/ptm/ptm.h b/src/core/hle/service/ptm/ptm.h index 06224a24e..a0ae03d28 100644 --- a/src/core/hle/service/ptm/ptm.h +++ b/src/core/hle/service/ptm/ptm.h | |||
| @@ -7,12 +7,8 @@ namespace Core { | |||
| 7 | class System; | 7 | class System; |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | namespace Service::SM { | ||
| 11 | class ServiceManager; | ||
| 12 | } | ||
| 13 | |||
| 14 | namespace Service::PTM { | 10 | namespace Service::PTM { |
| 15 | 11 | ||
| 16 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | 12 | void LoopProcess(Core::System& system); |
| 17 | 13 | ||
| 18 | } // namespace Service::PTM | 14 | } // namespace Service::PTM |