diff options
Diffstat (limited to 'src/core/hle/service/mii')
| -rw-r--r-- | src/core/hle/service/mii/mii.cpp | 18 | ||||
| -rw-r--r-- | src/core/hle/service/mii/mii.h | 6 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index d7080b715..26be9e45b 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp | |||
| @@ -18,7 +18,8 @@ constexpr ResultCode ERROR_INVALID_ARGUMENT{ErrorModule::Mii, 1}; | |||
| 18 | 18 | ||
| 19 | class IDatabaseService final : public ServiceFramework<IDatabaseService> { | 19 | class IDatabaseService final : public ServiceFramework<IDatabaseService> { |
| 20 | public: | 20 | public: |
| 21 | explicit IDatabaseService() : ServiceFramework{"IDatabaseService"} { | 21 | explicit IDatabaseService(Core::System& system_) |
| 22 | : ServiceFramework{system_, "IDatabaseService"} { | ||
| 22 | // clang-format off | 23 | // clang-format off |
| 23 | static const FunctionInfo functions[] = { | 24 | static const FunctionInfo functions[] = { |
| 24 | {0, &IDatabaseService::IsUpdated, "IsUpdated"}, | 25 | {0, &IDatabaseService::IsUpdated, "IsUpdated"}, |
| @@ -252,7 +253,8 @@ private: | |||
| 252 | 253 | ||
| 253 | class MiiDBModule final : public ServiceFramework<MiiDBModule> { | 254 | class MiiDBModule final : public ServiceFramework<MiiDBModule> { |
| 254 | public: | 255 | public: |
| 255 | explicit MiiDBModule(const char* name) : ServiceFramework{name} { | 256 | explicit MiiDBModule(Core::System& system_, const char* name) |
| 257 | : ServiceFramework{system_, name} { | ||
| 256 | // clang-format off | 258 | // clang-format off |
| 257 | static const FunctionInfo functions[] = { | 259 | static const FunctionInfo functions[] = { |
| 258 | {0, &MiiDBModule::GetDatabaseService, "GetDatabaseService"}, | 260 | {0, &MiiDBModule::GetDatabaseService, "GetDatabaseService"}, |
| @@ -266,7 +268,7 @@ private: | |||
| 266 | void GetDatabaseService(Kernel::HLERequestContext& ctx) { | 268 | void GetDatabaseService(Kernel::HLERequestContext& ctx) { |
| 267 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 269 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 268 | rb.Push(RESULT_SUCCESS); | 270 | rb.Push(RESULT_SUCCESS); |
| 269 | rb.PushIpcInterface<IDatabaseService>(); | 271 | rb.PushIpcInterface<IDatabaseService>(system); |
| 270 | 272 | ||
| 271 | LOG_DEBUG(Service_Mii, "called"); | 273 | LOG_DEBUG(Service_Mii, "called"); |
| 272 | } | 274 | } |
| @@ -274,7 +276,7 @@ private: | |||
| 274 | 276 | ||
| 275 | class MiiImg final : public ServiceFramework<MiiImg> { | 277 | class MiiImg final : public ServiceFramework<MiiImg> { |
| 276 | public: | 278 | public: |
| 277 | explicit MiiImg() : ServiceFramework{"miiimg"} { | 279 | explicit MiiImg(Core::System& system_) : ServiceFramework{system_, "miiimg"} { |
| 278 | // clang-format off | 280 | // clang-format off |
| 279 | static const FunctionInfo functions[] = { | 281 | static const FunctionInfo functions[] = { |
| 280 | {0, nullptr, "Initialize"}, | 282 | {0, nullptr, "Initialize"}, |
| @@ -298,11 +300,11 @@ public: | |||
| 298 | } | 300 | } |
| 299 | }; | 301 | }; |
| 300 | 302 | ||
| 301 | void InstallInterfaces(SM::ServiceManager& sm) { | 303 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { |
| 302 | std::make_shared<MiiDBModule>("mii:e")->InstallAsService(sm); | 304 | std::make_shared<MiiDBModule>(system, "mii:e")->InstallAsService(sm); |
| 303 | std::make_shared<MiiDBModule>("mii:u")->InstallAsService(sm); | 305 | std::make_shared<MiiDBModule>(system, "mii:u")->InstallAsService(sm); |
| 304 | 306 | ||
| 305 | std::make_shared<MiiImg>()->InstallAsService(sm); | 307 | std::make_shared<MiiImg>(system)->InstallAsService(sm); |
| 306 | } | 308 | } |
| 307 | 309 | ||
| 308 | } // namespace Service::Mii | 310 | } // namespace Service::Mii |
diff --git a/src/core/hle/service/mii/mii.h b/src/core/hle/service/mii/mii.h index 7ce9be50e..9d3238e72 100644 --- a/src/core/hle/service/mii/mii.h +++ b/src/core/hle/service/mii/mii.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::Mii { | 15 | namespace Service::Mii { |
| 12 | 16 | ||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | 17 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); |
| 14 | 18 | ||
| 15 | } // namespace Service::Mii | 19 | } // namespace Service::Mii |