diff options
| author | 2020-11-26 15:19:08 -0500 | |
|---|---|---|
| committer | 2020-11-26 20:03:11 -0500 | |
| commit | 1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f (patch) | |
| tree | 3593cd42e0ba676c3919561983f7e9766fcb641c /src/core/hle/service/es | |
| parent | Merge pull request #4975 from comex/invalid-syncpoint-id (diff) | |
| download | yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.gz yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.tar.xz yuzu-1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f.zip | |
service: Eliminate usages of the global system instance
Completely removes all usages of the global system instance within the
services code by passing in the using system instance to the services.
Diffstat (limited to 'src/core/hle/service/es')
| -rw-r--r-- | src/core/hle/service/es/es.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/es/es.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index c2737a365..26d1e3306 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp | |||
| @@ -14,7 +14,7 @@ constexpr ResultCode ERROR_INVALID_RIGHTS_ID{ErrorModule::ETicket, 3}; | |||
| 14 | 14 | ||
| 15 | class ETicket final : public ServiceFramework<ETicket> { | 15 | class ETicket final : public ServiceFramework<ETicket> { |
| 16 | public: | 16 | public: |
| 17 | explicit ETicket() : ServiceFramework{"es"} { | 17 | explicit ETicket(Core::System& system_) : ServiceFramework{system_, "es"} { |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | static const FunctionInfo functions[] = { | 19 | static const FunctionInfo functions[] = { |
| 20 | {1, &ETicket::ImportTicket, "ImportTicket"}, | 20 | {1, &ETicket::ImportTicket, "ImportTicket"}, |
| @@ -305,8 +305,8 @@ private: | |||
| 305 | Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::Instance(); | 305 | Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::Instance(); |
| 306 | }; | 306 | }; |
| 307 | 307 | ||
| 308 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 308 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { |
| 309 | std::make_shared<ETicket>()->InstallAsService(service_manager); | 309 | std::make_shared<ETicket>(system)->InstallAsService(service_manager); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | } // namespace Service::ES | 312 | } // namespace Service::ES |
diff --git a/src/core/hle/service/es/es.h b/src/core/hle/service/es/es.h index afe70465b..2a7b27d12 100644 --- a/src/core/hle/service/es/es.h +++ b/src/core/hle/service/es/es.h | |||
| @@ -4,6 +4,10 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | namespace Core { | ||
| 8 | class System; | ||
| 9 | } | ||
| 10 | |||
| 7 | namespace Service::SM { | 11 | namespace Service::SM { |
| 8 | class ServiceManager; | 12 | class ServiceManager; |
| 9 | } | 13 | } |
| @@ -11,6 +15,6 @@ class ServiceManager; | |||
| 11 | namespace Service::ES { | 15 | namespace Service::ES { |
| 12 | 16 | ||
| 13 | /// Registers all ES services with the specified service manager. | 17 | /// Registers all ES services with the specified service manager. |
| 14 | void InstallInterfaces(SM::ServiceManager& service_manager); | 18 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system); |
| 15 | 19 | ||
| 16 | } // namespace Service::ES | 20 | } // namespace Service::ES |