summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-10-10 15:58:47 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2018-10-10 15:58:47 +0200
commit9e924f2ef2add0f351df6addc01c356b52c8d7be (patch)
treea6bfc8c760bf12daab42f21a5dc077ab9fa8c89d /src/core/hle/service/hid/hid.cpp
parentAdded GetLedPattern and HandheldVariant (diff)
downloadyuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.tar
yuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.tar.gz
yuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.tar.bz2
yuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.tar.lz
yuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.tar.xz
yuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.tar.zst
yuzu-9e924f2ef2add0f351df6addc01c356b52c8d7be.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/hid.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 4c0d96cc2..65ee1d9bb 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -240,8 +240,8 @@ public:
{206, &Hid::SendVibrationValues, "SendVibrationValues"},
{207, nullptr, "SendVibrationGcErmCommand"},
{208, nullptr, "GetActualVibrationGcErmCommand"},
- {209, nullptr, "BeginPermitVibrationSession"},
- {210, nullptr, "EndPermitVibrationSession"},
+ {209, &Hid::BeginPermitVibrationSession, "BeginPermitVibrationSession"},
+ {210, &Hid::EndPermitVibrationSession, "EndPermitVibrationSession"},
{300, &Hid::ActivateConsoleSixAxisSensor, "ActivateConsoleSixAxisSensor"},
{301, &Hid::StartConsoleSixAxisSensor, "StartConsoleSixAxisSensor"},
{302, nullptr, "StopConsoleSixAxisSensor"},
@@ -457,6 +457,22 @@ private:
LOG_WARNING(Service_HID, "(STUBBED) called");
}
+ void BeginPermitVibrationSession(Kernel::HLERequestContext& ctx) {
+ applet_resource->GetController<Controller_NPad>(HidController::NPad)
+ .SetVibrationEnabled(true);
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+ LOG_DEBUG(Service_HID, "called");
+ }
+
+ void EndPermitVibrationSession(Kernel::HLERequestContext& ctx) {
+ applet_resource->GetController<Controller_NPad>(HidController::NPad)
+ .SetVibrationEnabled(false);
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+ LOG_DEBUG(Service_HID, "called");
+ }
+
void SendVibrationValue(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const auto controller_id = rp.PopRaw<u32>();