diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/btm/btm.cpp | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index eebf85e03..8069f75b7 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -5,10 +5,11 @@ #include "common/logging/log.h" #include "core/core.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_event.h" #include "core/hle/service/btm/btm.h" +#include "core/hle/service/ipc_helpers.h" #include "core/hle/service/kernel_helpers.h" +#include "core/hle/service/server_manager.h" #include "core/hle/service/service.h" namespace Service::BTM { @@ -69,35 +70,39 @@ public: } private: - void AcquireBleScanEvent(Kernel::HLERequestContext& ctx) { + void AcquireBleScanEvent(HLERequestContext& ctx) { LOG_WARNING(Service_BTM, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 2, 1}; + IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(ResultSuccess); + rb.Push(true); rb.PushCopyObjects(scan_event->GetReadableEvent()); } - void AcquireBleConnectionEvent(Kernel::HLERequestContext& ctx) { + void AcquireBleConnectionEvent(HLERequestContext& ctx) { LOG_WARNING(Service_BTM, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 2, 1}; + IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(ResultSuccess); + rb.Push(true); rb.PushCopyObjects(connection_event->GetReadableEvent()); } - void AcquireBleServiceDiscoveryEvent(Kernel::HLERequestContext& ctx) { + void AcquireBleServiceDiscoveryEvent(HLERequestContext& ctx) { LOG_WARNING(Service_BTM, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 2, 1}; + IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(ResultSuccess); + rb.Push(true); rb.PushCopyObjects(service_discovery_event->GetReadableEvent()); } - void AcquireBleMtuConfigEvent(Kernel::HLERequestContext& ctx) { + void AcquireBleMtuConfigEvent(HLERequestContext& ctx) { LOG_WARNING(Service_BTM, "(STUBBED) called"); - IPC::ResponseBuilder rb{ctx, 2, 1}; + IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(ResultSuccess); + rb.Push(true); rb.PushCopyObjects(config_event->GetReadableEvent()); } @@ -121,7 +126,7 @@ public: } private: - void GetCore(Kernel::HLERequestContext& ctx) { + void GetCore(HLERequestContext& ctx) { LOG_DEBUG(Service_BTM, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -302,7 +307,7 @@ public: } private: - void GetCore(Kernel::HLERequestContext& ctx) { + void GetCore(HLERequestContext& ctx) { LOG_DEBUG(Service_BTM, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -311,11 +316,14 @@ private: } }; -void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) { - std::make_shared<BTM>(system)->InstallAsService(sm); - std::make_shared<BTM_DBG>(system)->InstallAsService(sm); - std::make_shared<BTM_SYS>(system)->InstallAsService(sm); - std::make_shared<BTM_USR>(system)->InstallAsService(sm); +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService("btm", std::make_shared<BTM>(system)); + server_manager->RegisterNamedService("btm:dbg", std::make_shared<BTM_DBG>(system)); + server_manager->RegisterNamedService("btm:sys", std::make_shared<BTM_SYS>(system)); + server_manager->RegisterNamedService("btm:u", std::make_shared<BTM_USR>(system)); + ServerManager::RunServer(std::move(server_manager)); } } // namespace Service::BTM |