diff options
| author | 2018-07-30 20:06:21 +0300 | |
|---|---|---|
| committer | 2018-07-30 10:06:21 -0700 | |
| commit | fd797e2424033a693bf56c08ac90c3dac5c62881 (patch) | |
| tree | 0074a9c7c75ca6684f1dfdb41ac3d067e6d0e496 /src/core | |
| parent | Merge pull request #847 from lioncash/ncm (diff) | |
| download | yuzu-fd797e2424033a693bf56c08ac90c3dac5c62881.tar.gz yuzu-fd797e2424033a693bf56c08ac90c3dac5c62881.tar.xz yuzu-fd797e2424033a693bf56c08ac90c3dac5c62881.zip | |
Add some HID commands (#843)
* Added some HID commands
* Addressed comments
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index e4619a547..ed53f96c5 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -326,7 +326,7 @@ public: | |||
| 326 | {79, &Hid::SetGyroscopeZeroDriftMode, "SetGyroscopeZeroDriftMode"}, | 326 | {79, &Hid::SetGyroscopeZeroDriftMode, "SetGyroscopeZeroDriftMode"}, |
| 327 | {80, nullptr, "GetGyroscopeZeroDriftMode"}, | 327 | {80, nullptr, "GetGyroscopeZeroDriftMode"}, |
| 328 | {81, nullptr, "ResetGyroscopeZeroDriftMode"}, | 328 | {81, nullptr, "ResetGyroscopeZeroDriftMode"}, |
| 329 | {82, nullptr, "IsSixAxisSensorAtRest"}, | 329 | {82, &Hid::IsSixAxisSensorAtRest, "IsSixAxisSensorAtRest"}, |
| 330 | {91, nullptr, "ActivateGesture"}, | 330 | {91, nullptr, "ActivateGesture"}, |
| 331 | {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, | 331 | {100, &Hid::SetSupportedNpadStyleSet, "SetSupportedNpadStyleSet"}, |
| 332 | {101, &Hid::GetSupportedNpadStyleSet, "GetSupportedNpadStyleSet"}, | 332 | {101, &Hid::GetSupportedNpadStyleSet, "GetSupportedNpadStyleSet"}, |
| @@ -343,7 +343,7 @@ public: | |||
| 343 | "SetNpadJoyAssignmentModeSingleByDefault"}, | 343 | "SetNpadJoyAssignmentModeSingleByDefault"}, |
| 344 | {123, nullptr, "SetNpadJoyAssignmentModeSingleByDefault"}, | 344 | {123, nullptr, "SetNpadJoyAssignmentModeSingleByDefault"}, |
| 345 | {124, &Hid::SetNpadJoyAssignmentModeDual, "SetNpadJoyAssignmentModeDual"}, | 345 | {124, &Hid::SetNpadJoyAssignmentModeDual, "SetNpadJoyAssignmentModeDual"}, |
| 346 | {125, nullptr, "MergeSingleJoyAsDualJoy"}, | 346 | {125, &Hid::MergeSingleJoyAsDualJoy, "MergeSingleJoyAsDualJoy"}, |
| 347 | {126, nullptr, "StartLrAssignmentMode"}, | 347 | {126, nullptr, "StartLrAssignmentMode"}, |
| 348 | {127, nullptr, "StopLrAssignmentMode"}, | 348 | {127, nullptr, "StopLrAssignmentMode"}, |
| 349 | {128, &Hid::SetNpadHandheldActivationMode, "SetNpadHandheldActivationMode"}, | 349 | {128, &Hid::SetNpadHandheldActivationMode, "SetNpadHandheldActivationMode"}, |
| @@ -455,6 +455,14 @@ private: | |||
| 455 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 455 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | void IsSixAxisSensorAtRest(Kernel::HLERequestContext& ctx) { | ||
| 459 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 460 | rb.Push(RESULT_SUCCESS); | ||
| 461 | // TODO (Hexagon12): Properly implement reading gyroscope values from controllers. | ||
| 462 | rb.Push(true); | ||
| 463 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 464 | } | ||
| 465 | |||
| 458 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { | 466 | void SetSupportedNpadStyleSet(Kernel::HLERequestContext& ctx) { |
| 459 | IPC::ResponseBuilder rb{ctx, 2}; | 467 | IPC::ResponseBuilder rb{ctx, 2}; |
| 460 | rb.Push(RESULT_SUCCESS); | 468 | rb.Push(RESULT_SUCCESS); |
| @@ -530,6 +538,12 @@ private: | |||
| 530 | LOG_WARNING(Service_HID, "(STUBBED) called"); | 538 | LOG_WARNING(Service_HID, "(STUBBED) called"); |
| 531 | } | 539 | } |
| 532 | 540 | ||
| 541 | void MergeSingleJoyAsDualJoy(Kernel::HLERequestContext& ctx) { | ||
| 542 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 543 | rb.Push(RESULT_SUCCESS); | ||
| 544 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 545 | } | ||
| 546 | |||
| 533 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { | 547 | void SetNpadHandheldActivationMode(Kernel::HLERequestContext& ctx) { |
| 534 | IPC::ResponseBuilder rb{ctx, 2}; | 548 | IPC::ResponseBuilder rb{ctx, 2}; |
| 535 | rb.Push(RESULT_SUCCESS); | 549 | rb.Push(RESULT_SUCCESS); |