diff options
Diffstat (limited to 'src/core/hle/service/lm')
| -rw-r--r-- | src/core/hle/service/lm/lm.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 49a42a9c9..f884b2735 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp | |||
| @@ -18,8 +18,9 @@ namespace Service::LM { | |||
| 18 | 18 | ||
| 19 | class ILogger final : public ServiceFramework<ILogger> { | 19 | class ILogger final : public ServiceFramework<ILogger> { |
| 20 | public: | 20 | public: |
| 21 | explicit ILogger(Manager& manager_, Core::Memory::Memory& memory_) | 21 | explicit ILogger(Core::System& system_) |
| 22 | : ServiceFramework("ILogger"), manager{manager_}, memory{memory_} { | 22 | : ServiceFramework{system_, "ILogger"}, manager{system_.GetLogManager()}, |
| 23 | memory{system_.Memory()} { | ||
| 23 | static const FunctionInfo functions[] = { | 24 | static const FunctionInfo functions[] = { |
| 24 | {0, &ILogger::Log, "Log"}, | 25 | {0, &ILogger::Log, "Log"}, |
| 25 | {1, &ILogger::SetDestination, "SetDestination"}, | 26 | {1, &ILogger::SetDestination, "SetDestination"}, |
| @@ -81,8 +82,7 @@ private: | |||
| 81 | 82 | ||
| 82 | class LM final : public ServiceFramework<LM> { | 83 | class LM final : public ServiceFramework<LM> { |
| 83 | public: | 84 | public: |
| 84 | explicit LM(Manager& manager_, Core::Memory::Memory& memory_) | 85 | explicit LM(Core::System& system_) : ServiceFramework{system_, "lm"} { |
| 85 | : ServiceFramework{"lm"}, manager{manager_}, memory{memory_} { | ||
| 86 | // clang-format off | 86 | // clang-format off |
| 87 | static const FunctionInfo functions[] = { | 87 | static const FunctionInfo functions[] = { |
| 88 | {0, &LM::OpenLogger, "OpenLogger"}, | 88 | {0, &LM::OpenLogger, "OpenLogger"}, |
| @@ -98,16 +98,12 @@ private: | |||
| 98 | 98 | ||
| 99 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 99 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 100 | rb.Push(RESULT_SUCCESS); | 100 | rb.Push(RESULT_SUCCESS); |
| 101 | rb.PushIpcInterface<ILogger>(manager, memory); | 101 | rb.PushIpcInterface<ILogger>(system); |
| 102 | } | 102 | } |
| 103 | |||
| 104 | Manager& manager; | ||
| 105 | Core::Memory::Memory& memory; | ||
| 106 | }; | 103 | }; |
| 107 | 104 | ||
| 108 | void InstallInterfaces(Core::System& system) { | 105 | void InstallInterfaces(Core::System& system) { |
| 109 | std::make_shared<LM>(system.GetLogManager(), system.Memory()) | 106 | std::make_shared<LM>(system)->InstallAsService(system.ServiceManager()); |
| 110 | ->InstallAsService(system.ServiceManager()); | ||
| 111 | } | 107 | } |
| 112 | 108 | ||
| 113 | } // namespace Service::LM | 109 | } // namespace Service::LM |