diff options
Diffstat (limited to 'src/core/hle/service/fgm')
| -rw-r--r-- | src/core/hle/service/fgm/fgm.cpp | 18 | ||||
| -rw-r--r-- | src/core/hle/service/fgm/fgm.h | 6 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/core/hle/service/fgm/fgm.cpp b/src/core/hle/service/fgm/fgm.cpp index e461274c1..9dc1bc52e 100644 --- a/src/core/hle/service/fgm/fgm.cpp +++ b/src/core/hle/service/fgm/fgm.cpp | |||
| @@ -14,7 +14,7 @@ namespace Service::FGM { | |||
| 14 | 14 | ||
| 15 | class IRequest final : public ServiceFramework<IRequest> { | 15 | class IRequest final : public ServiceFramework<IRequest> { |
| 16 | public: | 16 | public: |
| 17 | explicit IRequest() : ServiceFramework{"IRequest"} { | 17 | explicit IRequest(Core::System& system_) : ServiceFramework{system_, "IRequest"} { |
| 18 | // clang-format off | 18 | // clang-format off |
| 19 | static const FunctionInfo functions[] = { | 19 | static const FunctionInfo functions[] = { |
| 20 | {0, nullptr, "Initialize"}, | 20 | {0, nullptr, "Initialize"}, |
| @@ -30,7 +30,7 @@ public: | |||
| 30 | 30 | ||
| 31 | class FGM final : public ServiceFramework<FGM> { | 31 | class FGM final : public ServiceFramework<FGM> { |
| 32 | public: | 32 | public: |
| 33 | explicit FGM(const char* name) : ServiceFramework{name} { | 33 | explicit FGM(Core::System& system_, const char* name) : ServiceFramework{system_, name} { |
| 34 | // clang-format off | 34 | // clang-format off |
| 35 | static const FunctionInfo functions[] = { | 35 | static const FunctionInfo functions[] = { |
| 36 | {0, &FGM::Initialize, "Initialize"}, | 36 | {0, &FGM::Initialize, "Initialize"}, |
| @@ -46,13 +46,13 @@ private: | |||
| 46 | 46 | ||
| 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 47 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 48 | rb.Push(RESULT_SUCCESS); | 48 | rb.Push(RESULT_SUCCESS); |
| 49 | rb.PushIpcInterface<IRequest>(); | 49 | rb.PushIpcInterface<IRequest>(system); |
| 50 | } | 50 | } |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | class FGM_DBG final : public ServiceFramework<FGM_DBG> { | 53 | class FGM_DBG final : public ServiceFramework<FGM_DBG> { |
| 54 | public: | 54 | public: |
| 55 | explicit FGM_DBG() : ServiceFramework{"fgm:dbg"} { | 55 | explicit FGM_DBG(Core::System& system_) : ServiceFramework{system_, "fgm:dbg"} { |
| 56 | // clang-format off | 56 | // clang-format off |
| 57 | static const FunctionInfo functions[] = { | 57 | static const FunctionInfo functions[] = { |
| 58 | {0, nullptr, "Initialize"}, | 58 | {0, nullptr, "Initialize"}, |
| @@ -65,11 +65,11 @@ public: | |||
| 65 | } | 65 | } |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | void InstallInterfaces(SM::ServiceManager& sm) { | 68 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { |
| 69 | std::make_shared<FGM>("fgm")->InstallAsService(sm); | 69 | std::make_shared<FGM>(system, "fgm")->InstallAsService(sm); |
| 70 | std::make_shared<FGM>("fgm:0")->InstallAsService(sm); | 70 | std::make_shared<FGM>(system, "fgm:0")->InstallAsService(sm); |
| 71 | std::make_shared<FGM>("fgm:9")->InstallAsService(sm); | 71 | std::make_shared<FGM>(system, "fgm:9")->InstallAsService(sm); |
| 72 | std::make_shared<FGM_DBG>()->InstallAsService(sm); | 72 | std::make_shared<FGM_DBG>(system)->InstallAsService(sm); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | } // namespace Service::FGM | 75 | } // namespace Service::FGM |
diff --git a/src/core/hle/service/fgm/fgm.h b/src/core/hle/service/fgm/fgm.h index e59691264..75978f2ed 100644 --- a/src/core/hle/service/fgm/fgm.h +++ b/src/core/hle/service/fgm/fgm.h | |||
| @@ -4,12 +4,16 @@ | |||
| 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 | } |
| 10 | 14 | ||
| 11 | namespace Service::FGM { | 15 | namespace Service::FGM { |
| 12 | 16 | ||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | 17 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); |
| 14 | 18 | ||
| 15 | } // namespace Service::FGM | 19 | } // namespace Service::FGM |