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/prepo | |
| 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/prepo')
| -rw-r--r-- | src/core/hle/service/prepo/prepo.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/prepo/prepo.h | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index b9ef86b72..392fda73e 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp | |||
| @@ -16,8 +16,7 @@ namespace Service::PlayReport { | |||
| 16 | 16 | ||
| 17 | class PlayReport final : public ServiceFramework<PlayReport> { | 17 | class PlayReport final : public ServiceFramework<PlayReport> { |
| 18 | public: | 18 | public: |
| 19 | explicit PlayReport(const char* name, Core::System& system) | 19 | explicit PlayReport(const char* name, Core::System& system_) : ServiceFramework{system_, name} { |
| 20 | : ServiceFramework{name}, system(system) { | ||
| 21 | // clang-format off | 20 | // clang-format off |
| 22 | static const FunctionInfo functions[] = { | 21 | static const FunctionInfo functions[] = { |
| 23 | {10100, &PlayReport::SaveReport<Core::Reporter::PlayReportType::Old>, "SaveReportOld"}, | 22 | {10100, &PlayReport::SaveReport<Core::Reporter::PlayReportType::Old>, "SaveReportOld"}, |
| @@ -140,8 +139,6 @@ private: | |||
| 140 | IPC::ResponseBuilder rb{ctx, 2}; | 139 | IPC::ResponseBuilder rb{ctx, 2}; |
| 141 | rb.Push(RESULT_SUCCESS); | 140 | rb.Push(RESULT_SUCCESS); |
| 142 | } | 141 | } |
| 143 | |||
| 144 | Core::System& system; | ||
| 145 | }; | 142 | }; |
| 146 | 143 | ||
| 147 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { | 144 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { |
diff --git a/src/core/hle/service/prepo/prepo.h b/src/core/hle/service/prepo/prepo.h index a5682ee26..395b57ead 100644 --- a/src/core/hle/service/prepo/prepo.h +++ b/src/core/hle/service/prepo/prepo.h | |||
| @@ -4,14 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Core { | 7 | namespace Core { |
| 12 | class System; | 8 | class System; |
| 13 | } | 9 | } |
| 14 | 10 | ||
| 11 | namespace Service::SM { | ||
| 12 | class ServiceManager; | ||
| 13 | } | ||
| 14 | |||
| 15 | namespace Service::PlayReport { | 15 | namespace Service::PlayReport { |
| 16 | 16 | ||
| 17 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system); | 17 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system); |