![]() |
vitasdk
Documentation of the vitasdk
|
Exports for User. More...
Data Structures | |
| struct | SceCtrlData |
| Returned controller data. More... | |
| struct | SceCtrlRapidFireRule |
| Structure to pass as argument to sceCtrlSetRapidFire. More... | |
| struct | SceCtrlActuator |
| Structure to pass as argument to sceCtrlSetActuator. More... | |
| struct | SceCtrlPortInfo |
| Structure to pass as argument to sceCtrlGetControllerPortInfo. More... | |
Functions | |
| int | sceCtrlSetSamplingMode (SceCtrlPadInputMode mode) |
| Set the controller mode. | |
| int | sceCtrlSetSamplingModeExt (SceCtrlPadInputMode mode) |
| Set the controller extend mode. | |
| int | sceCtrlGetSamplingMode (SceCtrlPadInputMode *pMode) |
| Get the current controller mode. | |
| int | sceCtrlPeekBufferPositive (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (polling, positive logic). | |
| int | sceCtrlPeekBufferPositive2 (int port, SceCtrlData *pad_data, int count) |
| Get the wireless controller state information (polling, positive logic). | |
| int | sceCtrlPeekBufferPositiveExt (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (polling, positive logic). | |
| int | sceCtrlPeekBufferPositiveExt2 (int port, SceCtrlData *pad_data, int count) |
| Get the wireless controller state information (polling, positive logic). | |
| int | sceCtrlPeekBufferNegative (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (polling, negative logic). | |
| int | sceCtrlPeekBufferNegative2 (int port, SceCtrlData *pad_data, int count) |
| Get the wireless controller state information (polling, negative logic). | |
| int | sceCtrlReadBufferPositive (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (blocking, positive logic). | |
| int | sceCtrlReadBufferPositive2 (int port, SceCtrlData *pad_data, int count) |
| Get the wireless controller state information (blocking, positive logic). | |
| int | sceCtrlReadBufferPositiveExt (int port, SceCtrlData *pad_data, int count) |
| Get the controller extended state information (blocking, positive logic). | |
| int | sceCtrlReadBufferPositiveExt2 (int port, SceCtrlData *pad_data, int count) |
| Get the wireless controller extended state information (blocking, positive logic). | |
| int | sceCtrlReadBufferNegative (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (blocking, negative logic). | |
| int | sceCtrlReadBufferNegative2 (int port, SceCtrlData *pad_data, int count) |
| Get the wireless controller state information (blocking, negative logic). | |
| int | sceCtrlSetRapidFire (int port, int idx, const SceCtrlRapidFireRule *pRule) |
| Set rules for button rapid fire. | |
| int | sceCtrlClearRapidFire (int port, int idx) |
| Clear rules for button rapid fire. | |
| int | sceCtrlSetActuator (int port, const SceCtrlActuator *pState) |
| Control the actuator (vibrate) on paired controllers. | |
| int | sceCtrlSetLightBar (int port, SceUInt8 r, SceUInt8 g, SceUInt8 b) |
| Control the light bar on paired controllers. | |
| int | sceCtrlGetControllerPortInfo (SceCtrlPortInfo *info) |
| Get controller port information. | |
| int | sceCtrlGetBatteryInfo (int port, SceUInt8 *batt) |
| Get controller battery information. | |
| int | sceCtrlSetButtonIntercept (int intercept) |
| Sets intercept. | |
| int | sceCtrlGetButtonIntercept (int *intercept) |
| Gets intercept. | |
| 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) | |
Variables | |
| uint64_t | SceCtrlData::timeStamp |
| The current read frame. | |
| unsigned int | SceCtrlData::buttons |
| Bit mask containing zero or more of SceCtrlButtons. | |
| unsigned char | SceCtrlData::lx |
| Left analogue stick, X axis. | |
| unsigned char | SceCtrlData::ly |
| Left analogue stick, Y axis. | |
| unsigned char | SceCtrlData::rx |
| Right analogue stick, X axis. | |
| unsigned char | SceCtrlData::ry |
| Right analogue stick, Y axis. | |
| uint8_t | SceCtrlData::up |
| Up button. | |
| uint8_t | SceCtrlData::right |
| Right button. | |
| uint8_t | SceCtrlData::down |
| Down button. | |
| uint8_t | SceCtrlData::left |
| Left button. | |
| uint8_t | SceCtrlData::lt |
| Left trigger (L2) | |
| uint8_t | SceCtrlData::rt |
| Right trigger (R2) | |
| uint8_t | SceCtrlData::l1 |
| Left button (L1) | |
| uint8_t | SceCtrlData::r1 |
| Right button (R1) | |
| uint8_t | SceCtrlData::triangle |
| Triangle button. | |
| uint8_t | SceCtrlData::circle |
| Circle button. | |
| uint8_t | SceCtrlData::cross |
| Cross button. | |
| uint8_t | SceCtrlData::square |
| Square button. | |
| uint8_t | SceCtrlData::reserved [4] |
| Reserved. | |
| unsigned int | SceCtrlRapidFireRule::Mask |
| unsigned int | SceCtrlRapidFireRule::Trigger |
| unsigned int | SceCtrlRapidFireRule::Target |
| unsigned int | SceCtrlRapidFireRule::Delay |
| unsigned int | SceCtrlRapidFireRule::Make |
| unsigned int | SceCtrlRapidFireRule::Break |
| unsigned char | SceCtrlActuator::small |
| Vibration strength of the small motor. | |
| unsigned char | SceCtrlActuator::large |
| Vibration strength of the large motor. | |
| uint8_t | SceCtrlActuator::unk [6] |
| Unknown. | |
| uint8_t | SceCtrlPortInfo::port [5] |
| Controller type of each port (See SceCtrlExternalInputMode) | |
| uint8_t | SceCtrlPortInfo::unk [11] |
| Unknown. | |
Exports for User.
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
| 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 | |||
| ) |
| uint64_t SceCtrlData::timeStamp |
The current read frame.
| unsigned int SceCtrlData::buttons |
Bit mask containing zero or more of SceCtrlButtons.
| unsigned char SceCtrlData::lx |
Left analogue stick, X axis.
| unsigned char SceCtrlData::ly |
Left analogue stick, Y axis.
| unsigned char SceCtrlData::rx |
Right analogue stick, X axis.
| unsigned char SceCtrlData::ry |
Right analogue stick, Y axis.
| uint8_t SceCtrlData::up |
Up button.
| uint8_t SceCtrlData::right |
Right button.
| uint8_t SceCtrlData::down |
Down button.
| uint8_t SceCtrlData::left |
Left button.
| uint8_t SceCtrlData::lt |
Left trigger (L2)
| uint8_t SceCtrlData::rt |
Right trigger (R2)
| uint8_t SceCtrlData::l1 |
Left button (L1)
| uint8_t SceCtrlData::r1 |
Right button (R1)
| uint8_t SceCtrlData::triangle |
Triangle button.
| uint8_t SceCtrlData::circle |
Circle button.
| uint8_t SceCtrlData::cross |
Cross button.
| uint8_t SceCtrlData::square |
Square button.
| uint8_t SceCtrlData::reserved[4] |
Reserved.
| unsigned int SceCtrlRapidFireRule::Mask |
| unsigned int SceCtrlRapidFireRule::Trigger |
| unsigned int SceCtrlRapidFireRule::Target |
| unsigned int SceCtrlRapidFireRule::Delay |
| unsigned int SceCtrlRapidFireRule::Make |
| unsigned int SceCtrlRapidFireRule::Break |
| unsigned char SceCtrlActuator::small |
Vibration strength of the small motor.
| unsigned char SceCtrlActuator::large |
Vibration strength of the large motor.
| uint8_t SceCtrlActuator::unk[6] |
Unknown.
| uint8_t SceCtrlPortInfo::port[5] |
Controller type of each port (See SceCtrlExternalInputMode)
| uint8_t SceCtrlPortInfo::unk[11] |
Unknown.