diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/mm/mm_u.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp index ba8c0e230..6f43b1968 100644 --- a/src/core/hle/service/mm/mm_u.cpp +++ b/src/core/hle/service/mm/mm_u.cpp @@ -2,8 +2,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/logging/log.h" -#include "core/hle/ipc_helpers.h" +#include "core/hle/service/ipc_helpers.h" #include "core/hle/service/mm/mm_u.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/sm/sm.h" namespace Service::MM { @@ -28,21 +29,21 @@ public: } private: - void InitializeOld(Kernel::HLERequestContext& ctx) { + void InitializeOld(HLERequestContext& ctx) { LOG_WARNING(Service_MM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); } - void FinalizeOld(Kernel::HLERequestContext& ctx) { + void FinalizeOld(HLERequestContext& ctx) { LOG_WARNING(Service_MM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); } - void SetAndWaitOld(Kernel::HLERequestContext& ctx) { + void SetAndWaitOld(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; min = rp.Pop<u32>(); max = rp.Pop<u32>(); @@ -53,7 +54,7 @@ private: rb.Push(ResultSuccess); } - void GetOld(Kernel::HLERequestContext& ctx) { + void GetOld(HLERequestContext& ctx) { LOG_DEBUG(Service_MM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; @@ -61,7 +62,7 @@ private: rb.Push(current); } - void Initialize(Kernel::HLERequestContext& ctx) { + void Initialize(HLERequestContext& ctx) { LOG_WARNING(Service_MM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; @@ -69,14 +70,14 @@ private: rb.Push<u32>(id); // Any non zero value } - void Finalize(Kernel::HLERequestContext& ctx) { + void Finalize(HLERequestContext& ctx) { LOG_WARNING(Service_MM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); } - void SetAndWait(Kernel::HLERequestContext& ctx) { + void SetAndWait(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; u32 input_id = rp.Pop<u32>(); min = rp.Pop<u32>(); @@ -89,7 +90,7 @@ private: rb.Push(ResultSuccess); } - void Get(Kernel::HLERequestContext& ctx) { + void Get(HLERequestContext& ctx) { LOG_DEBUG(Service_MM, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; @@ -103,8 +104,11 @@ private: u32 id{1}; }; -void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { - std::make_shared<MM_U>(system)->InstallAsService(service_manager); +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService("mm:u", std::make_shared<MM_U>(system)); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::MM |