diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/user/ctrl.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/user/ctrl.h b/include/user/ctrl.h index 7e06a41..062329c 100644 --- a/include/user/ctrl.h +++ b/include/user/ctrl.h @@ -36,6 +36,15 @@ enum { SCE_CTRL_ANY = 0x010000 //!< Any input intercepted. }; +/** Enumeration for the controller types. */ +enum { + SCE_CTRL_TYPE_UNPAIRED = 0, + SCE_CTRL_TYPE_PHY = 1, //!< Physical controller for VITA + SCE_CTRL_TYPE_VIRT = 2, //!< Virtual controller for PSTV + SCE_CTRL_TYPE_DS3 = 4, //!< DualShock 3 + SCE_CTRL_TYPE_DS4 = 8 //!< DualShock 4 +}; + /** Controller mode. */ enum { /** Digitial buttons only. */ @@ -80,6 +89,12 @@ typedef struct SceCtrlActuator { int unk; //!< Unknown } SceCtrlActuator; +/** Structure to pass as argument to ::sceCtrlGetControllerPortInfo */ +typedef struct SceCtrlPortInfo { + uint8_t port[5]; //!< Controller type of each ports + uint8_t unk[11]; //!< Unknown +} SceCtrlPortInfo; + /** * Set the controller mode. * @@ -210,10 +225,10 @@ int sceCtrlSetLightBar(int port, SceUInt8 r, SceUInt8 g, SceUInt8 b); /** * Get controller port information. * - * @param[out] info - Return value, use char[16] buffer + * @param[out] info - see ::SceCtrlPortInfo * @return 0, <0 on error */ -int sceCtrlGetControllerPortInfo(void *info); +int sceCtrlGetControllerPortInfo(SceCtrlPortInfo *info); #ifdef __cplusplus } #endif |