From 8e19ad47f5b7e362947b147f1bea740cc43372e9 Mon Sep 17 00:00:00 2001 From: Sunguk Lee Date: Mon, 15 Jan 2018 00:52:45 +0900 Subject: psp2: Add sceCtrlPeekBufferPositiveExt2 most like sceCtrlReadBufferPositiveExt2 but non-blocking --- include/user/ctrl.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include/user/ctrl.h') diff --git a/include/user/ctrl.h b/include/user/ctrl.h index 7bca5b9..0d1b02c 100644 --- a/include/user/ctrl.h +++ b/include/user/ctrl.h @@ -18,7 +18,7 @@ typedef enum SceCtrlErrorCode { } SceCtrlErrorCode; /** Enumeration for the digital controller buttons. - * @note - L1/R1/L3/R3 only can bind using ::sceCtrlReadBufferPositiveExt2 + * @note - L1/R1/L3/R3 only can bind using ::sceCtrlPeekBufferPositiveExt2 and ::sceCtrlReadBufferPositiveExt2 * @note - Values bigger than 0x00010000 can be intercepted only with shell privileges */ typedef enum SceCtrlButtons { @@ -170,6 +170,19 @@ int sceCtrlGetSamplingMode(SceCtrlPadInputMode *pMode); */ int sceCtrlPeekBufferPositive(int port, SceCtrlData *pad_data, int count); +/** + * Get the controller state information (polling, positive logic). + * + * This function will bind L/R trigger 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 sceCtrlPeekBufferPositiveExt2(int port, SceCtrlData *pad_data, int count); + /** * Get the controller state information (polling, negative logic). * -- cgit v1.2.3