From 9a6ee44295aeaef827ebced24ac3d27861f7eaf0 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 8 Aug 2016 20:46:42 -0700 Subject: Add sceCtrlSetActuator --- include/user/ctrl.h | 16 ++++++++++++++++ nids/360/SceCtrl.yml | 1 + 2 files changed, 17 insertions(+) diff --git a/include/user/ctrl.h b/include/user/ctrl.h index 9ac6d48..a05f9f6 100644 --- a/include/user/ctrl.h +++ b/include/user/ctrl.h @@ -68,6 +68,12 @@ typedef struct SceCtrlRapidFireRule { unsigned int Break; } SceCtrlRapidFireRule; +/** Structure to pass as argument to ::sceCtrlSetActuator */ +typedef struct SceCtrlActuator { + int enable; //!< Enable the actuator vibration + int unk; //!< Unknown +} SceCtrlActuator; + /** * Set the controller mode. * @@ -151,6 +157,16 @@ int sceCtrlSetRapidFire(int port, int idx, const SceCtrlRapidFireRule* pRule); */ int sceCtrlClearRapidFire(int port, int idx); +/** + * Control the actuator (vibrate) on paired controllers. + * + * @param[in] port - use 1 for the first paired controller, etc. + * @param[in] state - see ::SceCtrlActuator + * + * @return 0, <0 on error. + */ +int sceCtrlSetActuator(int port, const SceCtrlActuator* pState); + #ifdef __cplusplus } #endif diff --git a/nids/360/SceCtrl.yml b/nids/360/SceCtrl.yml index b2fcf94..97b762c 100644 --- a/nids/360/SceCtrl.yml +++ b/nids/360/SceCtrl.yml @@ -12,6 +12,7 @@ modules: sceCtrlPeekBufferPositive2: 0x15F81E8C sceCtrlReadBufferNegative: 0x15F96FB0 sceCtrlReadBufferPositive: 0x67E7AB83 + sceCtrlSetActuator: 0xDBCAA0C9 sceCtrlSetButtonIntercept: 0x433D71F4 sceCtrlSetRapidFire: 0xE9CB69C8 sceCtrlSetSamplingMode: 0xA497B150 -- cgit v1.2.3