summaryrefslogtreecommitdiff
path: root/include/user/ctrl.h
diff options
context:
space:
mode:
authorSunguk Lee2016-09-18 03:05:01 +0900
committerSunguk Lee2016-09-20 00:15:31 +0900
commit9df3831707e32052386ecaf9d7c4be863f0d749a (patch)
tree87dd4d05435daf7891d901c6985c112ddf1db8a6 /include/user/ctrl.h
parentAdd more SceCtrl NIDs (diff)
downloadvds-libraries-9df3831707e32052386ecaf9d7c4be863f0d749a.tar.gz
Add more button defines, and more SceCtrl function defines
- sceCtrlReadBufferPositiveExt2 - sceCtrlSetSamplingModeExt - sceCtrlGetControllerPortInfo
Diffstat (limited to 'include/user/ctrl.h')
-rw-r--r--include/user/ctrl.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/include/user/ctrl.h b/include/user/ctrl.h
index 0d15dfc..7e06a41 100644
--- a/include/user/ctrl.h
+++ b/include/user/ctrl.h
@@ -14,9 +14,12 @@ enum {
SCE_CTRL_ERROR_FATAL = 0x803400FF
};
-/** Enumeration for the digital controller buttons. */
+/** Enumeration for the digital controller buttons.
+ * L1/R1/L3/R3 only can bind using sceCtrlReadBufferPositiveExt2 */
enum {
SCE_CTRL_SELECT = 0x000001, //!< Select button.
+ SCE_CTRL_L3 = 0x000002, //!< L3 button.
+ SCE_CTRL_R3 = 0x000004, //!< R3 button.
SCE_CTRL_START = 0x000008, //!< Start button.
SCE_CTRL_UP = 0x000010, //!< Up D-Pad button.
SCE_CTRL_RIGHT = 0x000020, //!< Right D-Pad button.
@@ -24,6 +27,8 @@ enum {
SCE_CTRL_LEFT = 0x000080, //!< Left D-Pad button.
SCE_CTRL_LTRIGGER = 0x000100, //!< Left trigger.
SCE_CTRL_RTRIGGER = 0x000200, //!< Right trigger.
+ SCE_CTRL_L1 = 0x000400, //!< L1 button.
+ SCE_CTRL_R1 = 0x000800, //!< R1 button.
SCE_CTRL_TRIANGLE = 0x001000, //!< Triangle button.
SCE_CTRL_CIRCLE = 0x002000, //!< Circle button.
SCE_CTRL_CROSS = 0x004000, //!< Cross button.
@@ -85,6 +90,15 @@ typedef struct SceCtrlActuator {
int sceCtrlSetSamplingMode(int mode);
/**
+ * Set the controller extend mode.
+ *
+ * @param[in] mode - One of ::CtrlMode.
+ *
+ * @return The previous mode, <0 on error.
+ */
+int sceCtrlSetSamplingModeExt(int mode);
+
+/**
* Get the current controller mode.
*
* @param[out] pMode - Return value, see ::CtrlMode.
@@ -127,6 +141,19 @@ int sceCtrlPeekBufferNegative(int port, SceCtrlData *pad_data, int count);
int sceCtrlReadBufferPositive(int port, SceCtrlData *pad_data, int count);
/**
+ * Get the controller extended state information (blocking, positive logic).
+ *
+ * This function will bind L/R tringger value to L1/R1 instead of LTRIGGER/RTRIGGER
+ *
+ * @param[in] port - use 0.
+ * @param[out] *pad_data - see ::SceCtrlData.
+ * @param[in] count - Buffers count.
+ *
+ * @return Buffers count, between 1 and 'count'. <0 on error.
+ */
+int sceCtrlReadBufferPositiveExt2(int port, SceCtrlData *pad_data, int count);
+
+/**
* Get the controller state information (blocking, negative logic).
*
* @param[in] port - use 0.
@@ -180,6 +207,13 @@ int sceCtrlSetActuator(int port, const SceCtrlActuator* pState);
*/
int sceCtrlSetLightBar(int port, SceUInt8 r, SceUInt8 g, SceUInt8 b);
+/**
+ * Get controller port information.
+ *
+ * @param[out] info - Return value, use char[16] buffer
+ * @return 0, <0 on error
+ */
+int sceCtrlGetControllerPortInfo(void *info);
#ifdef __cplusplus
}
#endif