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/caps | |
| 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/caps')
| -rw-r--r-- | src/core/hle/service/caps/caps.cpp | 18 | ||||
| -rw-r--r-- | src/core/hle/service/caps/caps.h | 3 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/core/hle/service/caps/caps.cpp b/src/core/hle/service/caps/caps.cpp index 13940a8c9..610fe9940 100644 --- a/src/core/hle/service/caps/caps.cpp +++ b/src/core/hle/service/caps/caps.cpp | |||
| @@ -8,17 +8,21 @@ | |||
| 8 | #include "core/hle/service/caps/caps_ss.h" | 8 | #include "core/hle/service/caps/caps_ss.h" |
| 9 | #include "core/hle/service/caps/caps_su.h" | 9 | #include "core/hle/service/caps/caps_su.h" |
| 10 | #include "core/hle/service/caps/caps_u.h" | 10 | #include "core/hle/service/caps/caps_u.h" |
| 11 | #include "core/hle/service/server_manager.h" | ||
| 11 | #include "core/hle/service/service.h" | 12 | #include "core/hle/service/service.h" |
| 12 | 13 | ||
| 13 | namespace Service::Capture { | 14 | namespace Service::Capture { |
| 14 | 15 | ||
| 15 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { | 16 | void LoopProcess(Core::System& system) { |
| 16 | std::make_shared<CAPS_A>(system)->InstallAsService(sm); | 17 | auto server_manager = std::make_unique<ServerManager>(system); |
| 17 | std::make_shared<CAPS_C>(system)->InstallAsService(sm); | 18 | |
| 18 | std::make_shared<CAPS_U>(system)->InstallAsService(sm); | 19 | server_manager->RegisterNamedService("caps:a", std::make_shared<CAPS_A>(system)); |
| 19 | std::make_shared<CAPS_SC>(system)->InstallAsService(sm); | 20 | server_manager->RegisterNamedService("caps:c", std::make_shared<CAPS_C>(system)); |
| 20 | std::make_shared<CAPS_SS>(system)->InstallAsService(sm); | 21 | server_manager->RegisterNamedService("caps:u", std::make_shared<CAPS_U>(system)); |
| 21 | std::make_shared<CAPS_SU>(system)->InstallAsService(sm); | 22 | server_manager->RegisterNamedService("caps:sc", std::make_shared<CAPS_SC>(system)); |
| 23 | server_manager->RegisterNamedService("caps:ss", std::make_shared<CAPS_SS>(system)); | ||
| 24 | server_manager->RegisterNamedService("caps:su", std::make_shared<CAPS_SU>(system)); | ||
| 25 | ServerManager::RunServer(std::move(server_manager)); | ||
| 22 | } | 26 | } |
| 23 | 27 | ||
| 24 | } // namespace Service::Capture | 28 | } // namespace Service::Capture |
diff --git a/src/core/hle/service/caps/caps.h b/src/core/hle/service/caps/caps.h index 3e89c82cb..15f0ecfaa 100644 --- a/src/core/hle/service/caps/caps.h +++ b/src/core/hle/service/caps/caps.h | |||
| @@ -90,7 +90,6 @@ struct ApplicationAlbumFileEntry { | |||
| 90 | static_assert(sizeof(ApplicationAlbumFileEntry) == 0x30, | 90 | static_assert(sizeof(ApplicationAlbumFileEntry) == 0x30, |
| 91 | "ApplicationAlbumFileEntry has incorrect size."); | 91 | "ApplicationAlbumFileEntry has incorrect size."); |
| 92 | 92 | ||
| 93 | /// Registers all Capture services with the specified service manager. | 93 | void LoopProcess(Core::System& system); |
| 94 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); | ||
| 95 | 94 | ||
| 96 | } // namespace Service::Capture | 95 | } // namespace Service::Capture |