summaryrefslogtreecommitdiff
path: root/include/user/ctrl.h
diff options
context:
space:
mode:
authorSunguk Lee2016-09-23 22:57:27 +0900
committerSunguk Lee2016-09-24 01:35:16 +0900
commitf73809db10503255b4f5da379a6838e586855a1d (patch)
treea767722872ff24d434582434fe74b6ad0291ac94 /include/user/ctrl.h
parentAdd more button defines, and more SceCtrl function defines (diff)
downloadvds-libraries-f73809db10503255b4f5da379a6838e586855a1d.tar.gz
Add SceCtrlPortInfo structure
Diffstat (limited to 'include/user/ctrl.h')
-rw-r--r--include/user/ctrl.h19
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