From 583d6bb92dcbb33b6bb4a0fa1a9df6e3725d6ef6 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sun, 12 Jan 2020 12:25:16 -0500 Subject: [PATCH] hid: Fixed vibration, toggling vibration-enable off->on is no longer needed. Properly closes #148. --- nx/source/services/hid.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/nx/source/services/hid.c b/nx/source/services/hid.c index ede21101..bab1f175 100644 --- a/nx/source/services/hid.c +++ b/nx/source/services/hid.c @@ -11,6 +11,7 @@ static Service g_hidSrv; static Service g_hidIAppletResource; +static Service g_hidIActiveVibrationDeviceList; static SharedMemory g_hidSharedmem; static HidTouchScreenEntry g_touchEntry; @@ -103,6 +104,8 @@ Result _hidInitialize(void) { } void _hidCleanup(void) { + serviceClose(&g_hidIActiveVibrationDeviceList); + hidFinalizeSevenSixAxisSensor(); hidSetNpadJoyHoldType(HidJoyHoldType_Default); @@ -1098,19 +1101,20 @@ static Result _hidGetDeviceHandles(u32 devicetype, u32 *DeviceHandles, s32 total Result hidInitializeVibrationDevices(u32 *VibrationDeviceHandles, s32 total_handles, HidControllerID id, HidControllerType type) { Result rc=0; - Service srv; s32 i; rc = _hidGetDeviceHandles(0, VibrationDeviceHandles, total_handles, id, type); if (R_FAILED(rc)) return rc; - for (i=0; i