summaryrefslogtreecommitdiff
path: root/src/core/hle/service/mig
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/mig
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/mig')
-rw-r--r--src/core/hle/service/mig/mig.cpp6
-rw-r--r--src/core/hle/service/mig/mig.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/service/mig/mig.cpp b/src/core/hle/service/mig/mig.cpp
index 113a4665c..1599d941b 100644
--- a/src/core/hle/service/mig/mig.cpp
+++ b/src/core/hle/service/mig/mig.cpp
@@ -12,7 +12,7 @@ namespace Service::Migration {
12 12
13class MIG_USR final : public ServiceFramework<MIG_USR> { 13class MIG_USR final : public ServiceFramework<MIG_USR> {
14public: 14public:
15 explicit MIG_USR() : ServiceFramework{"mig:usr"} { 15 explicit MIG_USR(Core::System& system_) : ServiceFramework{system_, "mig:usr"} {
16 // clang-format off 16 // clang-format off
17 static const FunctionInfo functions[] = { 17 static const FunctionInfo functions[] = {
18 {10, nullptr, "TryGetLastMigrationInfo"}, 18 {10, nullptr, "TryGetLastMigrationInfo"},
@@ -33,8 +33,8 @@ public:
33 } 33 }
34}; 34};
35 35
36void InstallInterfaces(SM::ServiceManager& sm) { 36void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
37 std::make_shared<MIG_USR>()->InstallAsService(sm); 37 std::make_shared<MIG_USR>(system)->InstallAsService(sm);
38} 38}
39 39
40} // namespace Service::Migration 40} // namespace Service::Migration
diff --git a/src/core/hle/service/mig/mig.h b/src/core/hle/service/mig/mig.h
index 288c1c1b3..2b24cdf2c 100644
--- a/src/core/hle/service/mig/mig.h
+++ b/src/core/hle/service/mig/mig.h
@@ -4,12 +4,16 @@
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}
10 14
11namespace Service::Migration { 15namespace Service::Migration {
12 16
13void InstallInterfaces(SM::ServiceManager& sm); 17void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
14 18
15} // namespace Service::Migration 19} // namespace Service::Migration