summaryrefslogtreecommitdiff
path: root/src/core/hle/service/prepo
diff options
context:
space:
mode:
authorGravatar Lioncash2020-11-26 15:19:08 -0500
committerGravatar Lioncash2020-11-26 20:03:11 -0500
commit1a954b2a596fdfd4fc4b5feb9b43c8147de4cc7f (patch)
tree3593cd42e0ba676c3919561983f7e9766fcb641c /src/core/hle/service/prepo
parentMerge pull request #4975 from comex/invalid-syncpoint-id (diff)
downloadyuzu-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.cpp5
-rw-r--r--src/core/hle/service/prepo/prepo.h8
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
17class PlayReport final : public ServiceFramework<PlayReport> { 17class PlayReport final : public ServiceFramework<PlayReport> {
18public: 18public:
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
147void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { 144void 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
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Core { 7namespace Core {
12class System; 8class System;
13} 9}
14 10
11namespace Service::SM {
12class ServiceManager;
13}
14
15namespace Service::PlayReport { 15namespace Service::PlayReport {
16 16
17void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system); 17void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system);