diff options
| author | 2019-09-04 02:42:22 -0400 | |
|---|---|---|
| committer | 2019-09-04 02:42:22 -0400 | |
| commit | a83eb90a78c4ee3aac3636e22bebc8ab460b46f2 (patch) | |
| tree | 129c3ea8412dd07f93ad925b5f97033e9714fb49 /src | |
| parent | Merge pull request #2765 from FernandoS27/dma-fix (diff) | |
| download | yuzu-a83eb90a78c4ee3aac3636e22bebc8ab460b46f2.tar.gz yuzu-a83eb90a78c4ee3aac3636e22bebc8ab460b46f2.tar.xz yuzu-a83eb90a78c4ee3aac3636e22bebc8ab460b46f2.zip | |
Update hid.cpp
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 0bd24b8eb..6446edae3 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -216,8 +216,8 @@ Hid::Hid() : ServiceFramework("hid") { | |||
| 216 | {201, &Hid::SendVibrationValue, "SendVibrationValue"}, | 216 | {201, &Hid::SendVibrationValue, "SendVibrationValue"}, |
| 217 | {202, &Hid::GetActualVibrationValue, "GetActualVibrationValue"}, | 217 | {202, &Hid::GetActualVibrationValue, "GetActualVibrationValue"}, |
| 218 | {203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"}, | 218 | {203, &Hid::CreateActiveVibrationDeviceList, "CreateActiveVibrationDeviceList"}, |
| 219 | {204, nullptr, "PermitVibration"}, | 219 | {204, &Hid::PermitVibration, "PermitVibration"}, |
| 220 | {205, nullptr, "IsVibrationPermitted"}, | 220 | {205, &Hid::IsVibrationPermitted, "IsVibrationPermitted"}, |
| 221 | {206, &Hid::SendVibrationValues, "SendVibrationValues"}, | 221 | {206, &Hid::SendVibrationValues, "SendVibrationValues"}, |
| 222 | {207, nullptr, "SendVibrationGcErmCommand"}, | 222 | {207, nullptr, "SendVibrationGcErmCommand"}, |
| 223 | {208, nullptr, "GetActualVibrationGcErmCommand"}, | 223 | {208, nullptr, "GetActualVibrationGcErmCommand"}, |
| @@ -679,6 +679,27 @@ void Hid::CreateActiveVibrationDeviceList(Kernel::HLERequestContext& ctx) { | |||
| 679 | rb.PushIpcInterface<IActiveVibrationDeviceList>(); | 679 | rb.PushIpcInterface<IActiveVibrationDeviceList>(); |
| 680 | } | 680 | } |
| 681 | 681 | ||
| 682 | void Hid::PermitVibration(Kernel::HLERequestContext& ctx) { | ||
| 683 | IPC::RequestParser rp{ctx}; | ||
| 684 | const auto can_vibrate{rp.Pop<bool>()}; | ||
| 685 | applet_resource->GetController<Controller_NPad>(HidController::NPad) | ||
| 686 | .SetVibrationEnabled(can_vibrate); | ||
| 687 | |||
| 688 | LOG_DEBUG(Service_HID, "called, can_vibrate={}", can_vibrate); | ||
| 689 | |||
| 690 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 691 | rb.Push(RESULT_SUCCESS); | ||
| 692 | } | ||
| 693 | |||
| 694 | void Hid::IsVibrationPermitted(Kernel::HLERequestContext& ctx) { | ||
| 695 | LOG_DEBUG(Service_HID, "called"); | ||
| 696 | |||
| 697 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 698 | rb.Push(RESULT_SUCCESS); | ||
| 699 | rb.Push(applet_resource->GetController<Controller_NPad>(HidController::NPad) | ||
| 700 | .IsVibrationEnabled()); | ||
| 701 | } | ||
| 702 | |||
| 682 | void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { | 703 | void Hid::ActivateConsoleSixAxisSensor(Kernel::HLERequestContext& ctx) { |
| 683 | IPC::RequestParser rp{ctx}; | 704 | IPC::RequestParser rp{ctx}; |
| 684 | const auto applet_resource_user_id{rp.Pop<u64>()}; | 705 | const auto applet_resource_user_id{rp.Pop<u64>()}; |