vitasdk
Documentation of the vitasdk
|
Exports for User.
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Functions | |
int | sceCtrlSetSamplingMode (SceCtrlPadInputMode mode) |
Set the controller mode. More... | |
int | sceCtrlSetSamplingModeExt (SceCtrlPadInputMode mode) |
Set the controller extend mode. More... | |
int | sceCtrlGetSamplingMode (SceCtrlPadInputMode *pMode) |
Get the current controller mode. More... | |
int | sceCtrlPeekBufferPositive (int port, SceCtrlData *pad_data, int count) |
Get the controller state information (polling, positive logic). More... | |
int | sceCtrlPeekBufferPositive2 (int port, SceCtrlData *pad_data, int count) |
Get the wireless controller state information (polling, positive logic). More... | |
int | sceCtrlPeekBufferPositiveExt (int port, SceCtrlData *pad_data, int count) |
Get the controller state information (polling, positive logic). More... | |
int | sceCtrlPeekBufferPositiveExt2 (int port, SceCtrlData *pad_data, int count) |
Get the wireless controller state information (polling, positive logic). More... | |
int | sceCtrlPeekBufferNegative (int port, SceCtrlData *pad_data, int count) |
Get the controller state information (polling, negative logic). More... | |
int | sceCtrlPeekBufferNegative2 (int port, SceCtrlData *pad_data, int count) |
Get the wireless controller state information (polling, negative logic). More... | |
int | sceCtrlReadBufferPositive (int port, SceCtrlData *pad_data, int count) |
Get the controller state information (blocking, positive logic). More... | |
int | sceCtrlReadBufferPositive2 (int port, SceCtrlData *pad_data, int count) |
Get the wireless controller state information (blocking, positive logic). More... | |
int | sceCtrlReadBufferPositiveExt (int port, SceCtrlData *pad_data, int count) |
Get the controller extended state information (blocking, positive logic). More... | |
int | sceCtrlReadBufferPositiveExt2 (int port, SceCtrlData *pad_data, int count) |
Get the wireless controller extended state information (blocking, positive logic). More... | |
int | sceCtrlReadBufferNegative (int port, SceCtrlData *pad_data, int count) |
Get the controller state information (blocking, negative logic). More... | |
int | sceCtrlReadBufferNegative2 (int port, SceCtrlData *pad_data, int count) |
Get the wireless controller state information (blocking, negative logic). More... | |
int | sceCtrlSetRapidFire (int port, int idx, const SceCtrlRapidFireRule *pRule) |
Set rules for button rapid fire. More... | |
int | sceCtrlClearRapidFire (int port, int idx) |
Clear rules for button rapid fire. More... | |
int | sceCtrlSetActuator (int port, const SceCtrlActuator *pState) |
Control the actuator (vibrate) on paired controllers. More... | |
int | sceCtrlSetLightBar (int port, SceUInt8 r, SceUInt8 g, SceUInt8 b) |
Control the light bar on paired controllers. More... | |
int | sceCtrlGetControllerPortInfo (SceCtrlPortInfo *info) |
Get controller port information. More... | |
int | sceCtrlGetBatteryInfo (int port, SceUInt8 *batt) |
Get controller battery information. More... | |
int | sceCtrlSetButtonIntercept (int intercept) |
Sets intercept. More... | |
int | sceCtrlGetButtonIntercept (int *intercept) |
Gets intercept. More... | |
int | sceCtrlIsMultiControllerSupported (void) |
Check if multi controller is supported. More... | |
VITASDK_BUILD_ASSERT_EQ (0x20, SceCtrlData) | |
VITASDK_BUILD_ASSERT_EQ (0x18, SceCtrlRapidFireRule) | |
VITASDK_BUILD_ASSERT_EQ (8, SceCtrlActuator) | |
VITASDK_BUILD_ASSERT_EQ (0x10, SceCtrlPortInfo) | |
struct SceCtrlData |
Returned controller data.
Data Fields | ||
---|---|---|
uint64_t | timeStamp | The current read frame. |
unsigned int | buttons | Bit mask containing zero or more of SceCtrlButtons. |
unsigned char | lx | Left analogue stick, X axis. |
unsigned char | ly | Left analogue stick, Y axis. |
unsigned char | rx | Right analogue stick, X axis. |
unsigned char | ry | Right analogue stick, Y axis. |
uint8_t | up | Up button. |
uint8_t | right | Right button. |
uint8_t | down | Down button. |
uint8_t | left | Left button. |
uint8_t | lt | Left trigger (L2) |
uint8_t | rt | Right trigger (R2) |
uint8_t | l1 | Left button (L1) |
uint8_t | r1 | Right button (R1) |
uint8_t | triangle | Triangle button. |
uint8_t | circle | Circle button. |
uint8_t | cross | Cross button. |
uint8_t | square | Square button. |
uint8_t | reserved[4] | Reserved. |
struct SceCtrlRapidFireRule |
Structure to pass as argument to sceCtrlSetRapidFire.
Data Fields | ||
---|---|---|
unsigned int | Mask | |
unsigned int | Trigger | |
unsigned int | Target | |
unsigned int | Delay | |
unsigned int | Make | |
unsigned int | Break |
struct SceCtrlActuator |
Structure to pass as argument to sceCtrlSetActuator.
Data Fields | ||
---|---|---|
unsigned char | small | Vibration strength of the small motor. |
unsigned char | large | Vibration strength of the large motor. |
uint8_t | unk[6] | Unknown. |
struct SceCtrlPortInfo |
Structure to pass as argument to sceCtrlGetControllerPortInfo.
Data Fields | ||
---|---|---|
uint8_t | port[5] | Controller type of each port (See SceCtrlExternalInputMode) |
uint8_t | unk[11] | Unknown. |
enum SceCtrlErrorCode |
enum SceCtrlButtons |
Enumeration for the digital controller buttons.
enum SceCtrlPadInputMode |
Controller mode.
Enumerator | |
---|---|
SCE_CTRL_MODE_DIGITAL | Digital buttons only. |
SCE_CTRL_MODE_ANALOG | Digital buttons + Analog support. |
SCE_CTRL_MODE_ANALOG_WIDE | Same as SCE_CTRL_MODE_ANALOG, but with larger range for analog sticks. |
int sceCtrlSetSamplingMode | ( | SceCtrlPadInputMode | mode | ) |
Set the controller mode.
[in] | mode | - One of SceCtrlPadInputMode. |
int sceCtrlSetSamplingModeExt | ( | SceCtrlPadInputMode | mode | ) |
Set the controller extend mode.
[in] | mode | - One of SceCtrlPadInputMode. |
int sceCtrlGetSamplingMode | ( | SceCtrlPadInputMode * | pMode | ) |
Get the current controller mode.
[out] | pMode | - Return value, see SceCtrlPadInputMode. |
int sceCtrlPeekBufferPositive | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (polling, positive logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlPeekBufferPositive2 | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the wireless controller state information (polling, positive logic).
This function will bind L/R trigger value to L1/R1 instead of LTRIGGER/RTRIGGER
[in] | port | - use 0 - 5. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlPeekBufferPositiveExt | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (polling, positive logic).
This function will return button presses, even if they're intercepted by common dialog/IME.
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlPeekBufferPositiveExt2 | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the wireless controller state information (polling, positive logic).
This function will bind L/R trigger value to L1/R1 instead of LTRIGGER/RTRIGGER This function will return button presses, even if they're intercepted by common dialog/IME.
[in] | port | - use 0 - 5. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlPeekBufferNegative | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (polling, negative logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlPeekBufferNegative2 | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the wireless controller state information (polling, negative logic).
This function will bind L/R trigger value to L1/R1 instead of LTRIGGER/RTRIGGER
[in] | port | - use 0-5. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlReadBufferPositive | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (blocking, positive logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlReadBufferPositive2 | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the wireless controller state information (blocking, positive logic).
This function will bind L/R trigger value to L1/R1 instead of LTRIGGER/RTRIGGER
[in] | port | - use 0-5. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlReadBufferPositiveExt | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller extended state information (blocking, positive logic).
This function will return button presses, even if they're intercepted by common dialog/IME.
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlReadBufferPositiveExt2 | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the wireless controller extended state information (blocking, positive logic).
This function will bind L/R trigger value to L1/R1 instead of LTRIGGER/RTRIGGER This function will return button presses, even if they're intercepted by common dialog/IME.
[in] | port | - use 0-5. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlReadBufferNegative | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the controller state information (blocking, negative logic).
[in] | port | - use 0. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlReadBufferNegative2 | ( | int | port, |
SceCtrlData * | pad_data, | ||
int | count | ||
) |
Get the wireless controller state information (blocking, negative logic).
This function will bind L/R trigger value to L1/R1 instead of LTRIGGER/RTRIGGER
[in] | port | - use 0-5. |
[out] | *pad_data | - see SceCtrlData. |
[in] | count | - Buffers count. Up to 64 buffers can be requested. |
int sceCtrlSetRapidFire | ( | int | port, |
int | idx, | ||
const SceCtrlRapidFireRule * | pRule | ||
) |
Set rules for button rapid fire.
[in] | port | - use 0. |
[in] | idx | - rule index between 0-15 |
[in] | pRule | - structure SceCtrlRapidFireRule. |
int sceCtrlClearRapidFire | ( | int | port, |
int | idx | ||
) |
Clear rules for button rapid fire.
[in] | port | - use 0. |
[in] | idx | - rule index between 0-15 |
int sceCtrlSetActuator | ( | int | port, |
const SceCtrlActuator * | pState | ||
) |
Control the actuator (vibrate) on paired controllers.
[in] | port | - use 1 for the first paired controller, etc. |
[in] | state | - see SceCtrlActuator |
Control the light bar on paired controllers.
[in] | port | - use 1 for the first paired controller, etc. |
[in] | r | - red intensity |
[in] | g | - green intensity |
[in] | b | - blue intensity |
int sceCtrlGetControllerPortInfo | ( | SceCtrlPortInfo * | info | ) |
int sceCtrlGetBatteryInfo | ( | int | port, |
SceUInt8 * | batt | ||
) |
Get controller battery information.
[in] | port | - use 1 for the first paired controller, etc. |
[out] | batt | - battery level, between 0-5, 0xEE charging, 0xEF charged |
int sceCtrlSetButtonIntercept | ( | int | intercept | ) |
Sets intercept.
If true, allows the current thread to intercept controls. The use case might be, for example, a game plugin that wishes to capture input without having the input sent to the game thread.
[in] | intercept | Boolean value |
int sceCtrlGetButtonIntercept | ( | int * | intercept | ) |
Gets intercept.
[out] | intercept | Boolean value |
int sceCtrlIsMultiControllerSupported | ( | void | ) |
Check if multi controller is supported.
VITASDK_BUILD_ASSERT_EQ | ( | 0x20 | , |
SceCtrlData | |||
) |
VITASDK_BUILD_ASSERT_EQ | ( | 0x18 | , |
SceCtrlRapidFireRule | |||
) |
VITASDK_BUILD_ASSERT_EQ | ( | 8 | , |
SceCtrlActuator | |||
) |
VITASDK_BUILD_ASSERT_EQ | ( | 0x10 | , |
SceCtrlPortInfo | |||
) |