summaryrefslogtreecommitdiff
path: root/src/core/hle/service/eupld
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/eupld
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/eupld')
-rw-r--r--src/core/hle/service/eupld/eupld.cpp10
-rw-r--r--src/core/hle/service/eupld/eupld.h6
2 files changed, 10 insertions, 6 deletions
diff --git a/src/core/hle/service/eupld/eupld.cpp b/src/core/hle/service/eupld/eupld.cpp
index 0d6d244f4..2d650b1b7 100644
--- a/src/core/hle/service/eupld/eupld.cpp
+++ b/src/core/hle/service/eupld/eupld.cpp
@@ -12,7 +12,7 @@ namespace Service::EUPLD {
12 12
13class ErrorUploadContext final : public ServiceFramework<ErrorUploadContext> { 13class ErrorUploadContext final : public ServiceFramework<ErrorUploadContext> {
14public: 14public:
15 explicit ErrorUploadContext() : ServiceFramework{"eupld:c"} { 15 explicit ErrorUploadContext(Core::System& system_) : ServiceFramework{system_, "eupld:c"} {
16 // clang-format off 16 // clang-format off
17 static const FunctionInfo functions[] = { 17 static const FunctionInfo functions[] = {
18 {0, nullptr, "SetUrl"}, 18 {0, nullptr, "SetUrl"},
@@ -29,7 +29,7 @@ public:
29 29
30class ErrorUploadRequest final : public ServiceFramework<ErrorUploadRequest> { 30class ErrorUploadRequest final : public ServiceFramework<ErrorUploadRequest> {
31public: 31public:
32 explicit ErrorUploadRequest() : ServiceFramework{"eupld:r"} { 32 explicit ErrorUploadRequest(Core::System& system_) : ServiceFramework{system_, "eupld:r"} {
33 // clang-format off 33 // clang-format off
34 static const FunctionInfo functions[] = { 34 static const FunctionInfo functions[] = {
35 {0, nullptr, "Initialize"}, 35 {0, nullptr, "Initialize"},
@@ -45,9 +45,9 @@ public:
45 } 45 }
46}; 46};
47 47
48void InstallInterfaces(SM::ServiceManager& sm) { 48void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
49 std::make_shared<ErrorUploadContext>()->InstallAsService(sm); 49 std::make_shared<ErrorUploadContext>(system)->InstallAsService(sm);
50 std::make_shared<ErrorUploadRequest>()->InstallAsService(sm); 50 std::make_shared<ErrorUploadRequest>(system)->InstallAsService(sm);
51} 51}
52 52
53} // namespace Service::EUPLD 53} // namespace Service::EUPLD
diff --git a/src/core/hle/service/eupld/eupld.h b/src/core/hle/service/eupld/eupld.h
index 6eef2c15f..539993a9d 100644
--- a/src/core/hle/service/eupld/eupld.h
+++ b/src/core/hle/service/eupld/eupld.h
@@ -4,6 +4,10 @@
4 4
5#pragma once 5#pragma once
6 6
7namespace Core {
8class System;
9}
10
7namespace Service::SM { 11namespace Service::SM {
8class ServiceManager; 12class ServiceManager;
9} 13}
@@ -11,6 +15,6 @@ class ServiceManager;
11namespace Service::EUPLD { 15namespace Service::EUPLD {
12 16
13/// Registers all EUPLD services with the specified service manager. 17/// Registers all EUPLD services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& sm); 18void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
15 19
16} // namespace Service::EUPLD 20} // namespace Service::EUPLD