diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/btm/btm.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index f6c0fb8d9..b949bfabd 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp | |||
| @@ -4,6 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | ||
| 8 | #include "core/hle/ipc_helpers.h" | ||
| 9 | #include "core/hle/kernel/hle_ipc.h" | ||
| 7 | #include "core/hle/service/btm/btm.h" | 10 | #include "core/hle/service/btm/btm.h" |
| 8 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| 9 | #include "core/hle/service/sm/sm.h" | 12 | #include "core/hle/service/sm/sm.h" |
| @@ -65,17 +68,48 @@ public: | |||
| 65 | } | 68 | } |
| 66 | }; | 69 | }; |
| 67 | 70 | ||
| 71 | class IBtmSystemCore final : public ServiceFramework<IBtmSystemCore> { | ||
| 72 | public: | ||
| 73 | explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} { | ||
| 74 | // clang-format off | ||
| 75 | static const FunctionInfo functions[] = { | ||
| 76 | {0, nullptr, "StartGamepadPairingImpl"}, | ||
| 77 | {1, nullptr, "CancelGamepadPairingImpl"}, | ||
| 78 | {2, nullptr, "ClearGamepadPairingDatabaseImpl"}, | ||
| 79 | {3, nullptr, "GetPairedGamepadCountImpl"}, | ||
| 80 | {4, nullptr, "EnableRadioImpl"}, | ||
| 81 | {5, nullptr, "DisableRadioImpl"}, | ||
| 82 | {6, nullptr, "GetRadioOnOffImpl"}, | ||
| 83 | {7, nullptr, "AcquireRadioEventImpl"}, | ||
| 84 | {8, nullptr, "AcquireGamepadPairingEventImpl"}, | ||
| 85 | {9, nullptr, "IsGamepadPairingStartedImpl"}, | ||
| 86 | }; | ||
| 87 | // clang-format on | ||
| 88 | |||
| 89 | RegisterHandlers(functions); | ||
| 90 | } | ||
| 91 | }; | ||
| 92 | |||
| 68 | class BTM_SYS final : public ServiceFramework<BTM_SYS> { | 93 | class BTM_SYS final : public ServiceFramework<BTM_SYS> { |
| 69 | public: | 94 | public: |
| 70 | explicit BTM_SYS() : ServiceFramework{"btm:sys"} { | 95 | explicit BTM_SYS() : ServiceFramework{"btm:sys"} { |
| 71 | // clang-format off | 96 | // clang-format off |
| 72 | static const FunctionInfo functions[] = { | 97 | static const FunctionInfo functions[] = { |
| 73 | {0, nullptr, "GetCoreImpl"}, | 98 | {0, &BTM_SYS::GetCoreImpl, "GetCoreImpl"}, |
| 74 | }; | 99 | }; |
| 75 | // clang-format on | 100 | // clang-format on |
| 76 | 101 | ||
| 77 | RegisterHandlers(functions); | 102 | RegisterHandlers(functions); |
| 78 | } | 103 | } |
| 104 | |||
| 105 | private: | ||
| 106 | void GetCoreImpl(Kernel::HLERequestContext& ctx) { | ||
| 107 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 108 | rb.Push(RESULT_SUCCESS); | ||
| 109 | rb.PushIpcInterface<IBtmSystemCore>(); | ||
| 110 | |||
| 111 | LOG_DEBUG(Service_BTM, "called"); | ||
| 112 | } | ||
| 79 | }; | 113 | }; |
| 80 | 114 | ||
| 81 | void InstallInterfaces(SM::ServiceManager& sm) { | 115 | void InstallInterfaces(SM::ServiceManager& sm) { |