diff options
| author | 2023-11-01 01:09:33 +0100 | |
|---|---|---|
| committer | 2023-11-19 18:38:58 +0100 | |
| commit | cb004d1ba1bde740ba10418ac3f3cfd2db8ffac7 (patch) | |
| tree | dfcff7952ed84cea825e1144284d82505ec09731 /src/core/hle/service/btm | |
| parent | Merge pull request #12055 from german77/activate (diff) | |
| download | yuzu-cb004d1ba1bde740ba10418ac3f3cfd2db8ffac7.tar.gz yuzu-cb004d1ba1bde740ba10418ac3f3cfd2db8ffac7.tar.xz yuzu-cb004d1ba1bde740ba10418ac3f3cfd2db8ffac7.zip | |
Implemented qlaunch version of the controller applet
Diffstat (limited to 'src/core/hle/service/btm')
| -rw-r--r-- | src/core/hle/service/btm/btm.cpp | 56 |
1 files changed, 48 insertions, 8 deletions
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index 8069f75b7..c65e32489 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp | |||
| @@ -127,7 +127,7 @@ public: | |||
| 127 | 127 | ||
| 128 | private: | 128 | private: |
| 129 | void GetCore(HLERequestContext& ctx) { | 129 | void GetCore(HLERequestContext& ctx) { |
| 130 | LOG_DEBUG(Service_BTM, "called"); | 130 | LOG_WARNING(Service_BTM, "called"); |
| 131 | 131 | ||
| 132 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 132 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 133 | rb.Push(ResultSuccess); | 133 | rb.Push(ResultSuccess); |
| @@ -263,13 +263,13 @@ public: | |||
| 263 | explicit IBtmSystemCore(Core::System& system_) : ServiceFramework{system_, "IBtmSystemCore"} { | 263 | explicit IBtmSystemCore(Core::System& system_) : ServiceFramework{system_, "IBtmSystemCore"} { |
| 264 | // clang-format off | 264 | // clang-format off |
| 265 | static const FunctionInfo functions[] = { | 265 | static const FunctionInfo functions[] = { |
| 266 | {0, nullptr, "StartGamepadPairing"}, | 266 | {0, &IBtmSystemCore::StartGamepadPairing, "StartGamepadPairing"}, |
| 267 | {1, nullptr, "CancelGamepadPairing"}, | 267 | {1, &IBtmSystemCore::CancelGamepadPairing, "CancelGamepadPairing"}, |
| 268 | {2, nullptr, "ClearGamepadPairingDatabase"}, | 268 | {2, nullptr, "ClearGamepadPairingDatabase"}, |
| 269 | {3, nullptr, "GetPairedGamepadCount"}, | 269 | {3, nullptr, "GetPairedGamepadCount"}, |
| 270 | {4, nullptr, "EnableRadio"}, | 270 | {4, nullptr, "EnableRadio"}, |
| 271 | {5, nullptr, "DisableRadio"}, | 271 | {5, nullptr, "DisableRadio"}, |
| 272 | {6, nullptr, "GetRadioOnOff"}, | 272 | {6, &IBtmSystemCore::IsRadioEnabled, "IsRadioEnabled"}, |
| 273 | {7, nullptr, "AcquireRadioEvent"}, | 273 | {7, nullptr, "AcquireRadioEvent"}, |
| 274 | {8, nullptr, "AcquireGamepadPairingEvent"}, | 274 | {8, nullptr, "AcquireGamepadPairingEvent"}, |
| 275 | {9, nullptr, "IsGamepadPairingStarted"}, | 275 | {9, nullptr, "IsGamepadPairingStarted"}, |
| @@ -280,18 +280,58 @@ public: | |||
| 280 | {14, nullptr, "AcquireAudioDeviceConnectionEvent"}, | 280 | {14, nullptr, "AcquireAudioDeviceConnectionEvent"}, |
| 281 | {15, nullptr, "ConnectAudioDevice"}, | 281 | {15, nullptr, "ConnectAudioDevice"}, |
| 282 | {16, nullptr, "IsConnectingAudioDevice"}, | 282 | {16, nullptr, "IsConnectingAudioDevice"}, |
| 283 | {17, nullptr, "GetConnectedAudioDevices"}, | 283 | {17, &IBtmSystemCore::GetConnectedAudioDevices, "GetConnectedAudioDevices"}, |
| 284 | {18, nullptr, "DisconnectAudioDevice"}, | 284 | {18, nullptr, "DisconnectAudioDevice"}, |
| 285 | {19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"}, | 285 | {19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"}, |
| 286 | {20, nullptr, "GetPairedAudioDevices"}, | 286 | {20, nullptr, "GetPairedAudioDevices"}, |
| 287 | {21, nullptr, "RemoveAudioDevicePairing"}, | 287 | {21, nullptr, "RemoveAudioDevicePairing"}, |
| 288 | {22, nullptr, "RequestAudioDeviceConnectionRejection"}, | 288 | {22, &IBtmSystemCore::RequestAudioDeviceConnectionRejection, "RequestAudioDeviceConnectionRejection"}, |
| 289 | {23, nullptr, "CancelAudioDeviceConnectionRejection"} | 289 | {23, &IBtmSystemCore::CancelAudioDeviceConnectionRejection, "CancelAudioDeviceConnectionRejection"} |
| 290 | }; | 290 | }; |
| 291 | // clang-format on | 291 | // clang-format on |
| 292 | 292 | ||
| 293 | RegisterHandlers(functions); | 293 | RegisterHandlers(functions); |
| 294 | } | 294 | } |
| 295 | |||
| 296 | private: | ||
| 297 | void IsRadioEnabled(HLERequestContext& ctx) { | ||
| 298 | LOG_DEBUG(Service_BTM, "(STUBBED) called"); // Spams a lot when controller applet is running | ||
| 299 | |||
| 300 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 301 | rb.Push(ResultSuccess); | ||
| 302 | rb.Push(true); | ||
| 303 | } | ||
| 304 | |||
| 305 | void StartGamepadPairing(HLERequestContext& ctx) { | ||
| 306 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | ||
| 307 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 308 | rb.Push(ResultSuccess); | ||
| 309 | } | ||
| 310 | |||
| 311 | void CancelGamepadPairing(HLERequestContext& ctx) { | ||
| 312 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | ||
| 313 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 314 | rb.Push(ResultSuccess); | ||
| 315 | } | ||
| 316 | |||
| 317 | void CancelAudioDeviceConnectionRejection(HLERequestContext& ctx) { | ||
| 318 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | ||
| 319 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 320 | rb.Push(ResultSuccess); | ||
| 321 | } | ||
| 322 | |||
| 323 | void GetConnectedAudioDevices(HLERequestContext& ctx) { | ||
| 324 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | ||
| 325 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 326 | rb.Push(ResultSuccess); | ||
| 327 | rb.Push<u32>(0); | ||
| 328 | } | ||
| 329 | |||
| 330 | void RequestAudioDeviceConnectionRejection(HLERequestContext& ctx) { | ||
| 331 | LOG_WARNING(Service_BTM, "(STUBBED) called"); | ||
| 332 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 333 | rb.Push(ResultSuccess); | ||
| 334 | } | ||
| 295 | }; | 335 | }; |
| 296 | 336 | ||
| 297 | class BTM_SYS final : public ServiceFramework<BTM_SYS> { | 337 | class BTM_SYS final : public ServiceFramework<BTM_SYS> { |
| @@ -308,7 +348,7 @@ public: | |||
| 308 | 348 | ||
| 309 | private: | 349 | private: |
| 310 | void GetCore(HLERequestContext& ctx) { | 350 | void GetCore(HLERequestContext& ctx) { |
| 311 | LOG_DEBUG(Service_BTM, "called"); | 351 | LOG_WARNING(Service_BTM, "called"); |
| 312 | 352 | ||
| 313 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 353 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 314 | rb.Push(ResultSuccess); | 354 | rb.Push(ResultSuccess); |