![]() |
vitasdk
Documentation of the vitasdk
|
Exports for Kernel. More...
Data Structures | |
| struct | SceCtrlVirtualControllerDriver |
| Structure to pass as argument to ksceCtrlRegisterVirtualControllerDriver. More... | |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (0x34, SceCtrlVirtualControllerDriver) | |
| int | ksceCtrlSetSamplingMode (int mode) |
| Set the controller mode. | |
| int | ksceCtrlGetSamplingMode (int *pMode) |
| Get the current controller mode. | |
| int | ksceCtrlPeekBufferPositive (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (polling, positive logic). | |
| int | ksceCtrlPeekBufferNegative (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (polling, negative logic). | |
| int | ksceCtrlReadBufferPositive (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (blocking, positive logic). | |
| int | ksceCtrlReadBufferNegative (int port, SceCtrlData *pad_data, int count) |
| Get the controller state information (blocking, negative logic). | |
| int | ksceCtrlSetRapidFire (int port, int idx, const SceCtrlRapidFireRule *pRule) |
| Set rules for button rapid fire. | |
| int | ksceCtrlClearRapidFire (int port, int idx) |
| Clear rules for button rapid fire. | |
| int | ksceCtrlGetControllerPortInfo (SceCtrlPortInfo *info) |
| Get controller port information. | |
| int | ksceCtrlSetButtonIntercept (int intercept) |
| Sets intercept. | |
| int | ksceCtrlGetButtonIntercept (int *intercept) |
| Gets intercept. | |
| int | ksceCtrlSetButtonEmulation (unsigned int port, unsigned char slot, unsigned int userButtons, unsigned int kernelButtons, unsigned int uiMake) |
| Emulate buttons for the digital pad. | |
| int | ksceCtrlSetAnalogEmulation (unsigned int port, unsigned char slot, unsigned char user_lX, unsigned char user_lY, unsigned char user_rX, unsigned char user_rY, unsigned char kernel_lX, unsigned char kernel_lY, unsigned char kernel_rX, unsigned char kernel_rY, unsigned int uiMake) |
| Emulate values for the analog pad's X- and Y-axis. | |
| int | ksceCtrlRegisterVirtualControllerDriver (SceCtrlVirtualControllerDriver *driver) |
| Register virtual controller driver. | |
| int | ksceCtrlUpdateMaskForNonShell (int clear_mask, int set_mask) |
| Update ctrl mask for non shell process. | |
| int | ksceCtrlUpdateMaskForAll (int clear_mask, int set_mask) |
| Update ctrl mask for all process. | |
| int | ksceCtrlGetMaskForNonShell (uint32_t *mask) |
| Get ctrl mask for non shell process. | |
| int | ksceCtrlGetMaskForAll (uint32_t *mask) |
| Get ctrl mask for all process. | |
Variables | |
| int(* | SceCtrlVirtualControllerDriver::readButtons )(int port, SceCtrlData *pad_data, int count) |
| int(* | SceCtrlVirtualControllerDriver::setActuator )(int port, const SceCtrlActuator *pState) |
| int(* | SceCtrlVirtualControllerDriver::getBatteryInfo )(int port, SceUInt8 *batt) |
| int(* | SceCtrlVirtualControllerDriver::disconnect )(int port) |
| int(* | SceCtrlVirtualControllerDriver::setTurnOffInterval )(int port) |
| int(* | SceCtrlVirtualControllerDriver::getActiveControllerPort )(void) |
| int(* | SceCtrlVirtualControllerDriver::changePortAssign )(int port1, int port2) |
| int(* | SceCtrlVirtualControllerDriver::unk0 )(void) |
| int(* | SceCtrlVirtualControllerDriver::getControllerPortInfo )(SceCtrlPortInfo *info) |
| int(* | SceCtrlVirtualControllerDriver::setLightBar )(int port, SceUInt8 r, SceUInt8 g, SceUInt8 b) |
| int(* | SceCtrlVirtualControllerDriver::resetLightBar )(int port) |
| int(* | SceCtrlVirtualControllerDriver::unk1 )(int port) |
| int(* | SceCtrlVirtualControllerDriver::singleControllerMode )(int port) |
Exports for Kernel.
Include the header file in your project:
Link the library to the executable:
| struct SceCtrlVirtualControllerDriver |
Structure to pass as argument to ksceCtrlRegisterVirtualControllerDriver.
Data Fields | |
| int(* | readButtons )(int port, SceCtrlData *pad_data, int count) |
| int(* | setActuator )(int port, const SceCtrlActuator *pState) |
| int(* | getBatteryInfo )(int port, SceUInt8 *batt) |
| int(* | disconnect )(int port) |
| int(* | setTurnOffInterval )(int port) |
| int(* | getActiveControllerPort )(void) |
| int(* | changePortAssign )(int port1, int port2) |
| int(* | unk0 )(void) |
| int(* | getControllerPortInfo )(SceCtrlPortInfo *info) |
| int(* | setLightBar )(int port, SceUInt8 r, SceUInt8 g, SceUInt8 b) |
| int(* | resetLightBar )(int port) |
| int(* | unk1 )(int port) |
| int(* | singleControllerMode )(int port) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x34 | , |
| SceCtrlVirtualControllerDriver | |||
| ) |
| int ksceCtrlSetSamplingMode | ( | int | mode | ) |
Set the controller mode.
| [in] | mode | - One of SceCtrlPadInputMode. |
| int ksceCtrlGetSamplingMode | ( | int * | pMode | ) |
Get the current controller mode.
| [out] | pMode | - Return value, see SceCtrlPadInputMode. |
| int ksceCtrlPeekBufferPositive | ( | 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. |
| int ksceCtrlPeekBufferNegative | ( | 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. |
| int ksceCtrlReadBufferPositive | ( | 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. |
| int ksceCtrlReadBufferNegative | ( | 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. |
| int ksceCtrlSetRapidFire | ( | 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 ksceCtrlClearRapidFire | ( | int | port, |
| int | idx | ||
| ) |
Clear rules for button rapid fire.
| [in] | port | - use 0. |
| [in] | idx | - rule index between 0-15 |
| int ksceCtrlGetControllerPortInfo | ( | SceCtrlPortInfo * | info | ) |
| int ksceCtrlSetButtonIntercept | ( | 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 ksceCtrlGetButtonIntercept | ( | int * | intercept | ) |
Gets intercept.
| [out] | intercept | Boolean value |
| int ksceCtrlSetButtonEmulation | ( | unsigned int | port, |
| unsigned char | slot, | ||
| unsigned int | userButtons, | ||
| unsigned int | kernelButtons, | ||
| unsigned int | uiMake | ||
| ) |
Emulate buttons for the digital pad.
| port | Use 0 |
| slot | The slot used to set the custom values. Between 0 - 3. If multiple slots are used, their settings are combined. |
| userButtons | Emulated user buttons of SceCtrlButtons. You cannot emulate kernel buttons and the emulated buttons will only be applied for applications running in user mode. |
| kernelButtons | Emulated buttons of SceCtrlButtons (you can emulate both user and kernel buttons). The emulated buttons will only be applied for applications running in kernel mode. |
| uiMake | Specifies the duration of the emulation. Measured in sampling counts. |
| int ksceCtrlSetAnalogEmulation | ( | unsigned int | port, |
| unsigned char | slot, | ||
| unsigned char | user_lX, | ||
| unsigned char | user_lY, | ||
| unsigned char | user_rX, | ||
| unsigned char | user_rY, | ||
| unsigned char | kernel_lX, | ||
| unsigned char | kernel_lY, | ||
| unsigned char | kernel_rX, | ||
| unsigned char | kernel_rY, | ||
| unsigned int | uiMake | ||
| ) |
Emulate values for the analog pad's X- and Y-axis.
| port | Use 0 |
| slot | The slot used to set the custom values. Between 0 - 3. If multiple slots are used, their settings are combined. |
| user_lX | New emulated value for the left joystick's X-axis (userspace). Between 0 - 0xFF. |
| user_lY | New emulate value for the left joystick's Y-axis (userspace). Between 0 - 0xFF. |
| user_rX | New emulated value for the right joystick's X-axis (userspace). Between 0 - 0xFF. |
| user_rY | New emulate value for the right joystick's Y-axis (userspace). Between 0 - 0xFF. |
| kernel_lX | New emulated value for the left joystick's X-axis (kernelspace). Between 0 - 0xFF. |
| kernel_lY | New emulate value for the left joystick's Y-axis (kernelspace). Between 0 - 0xFF. |
| kernel_rX | New emulated value for the right joystick's X-axis (kernelspace). Between 0 - 0xFF. |
| kernel_rY | New emulate value for the right joystick's Y-axis (kernelspace). Between 0 - 0xFF. |
| uiMake | Specifies the duration of the emulation. Measured in sampling counts. |
| int ksceCtrlRegisterVirtualControllerDriver | ( | SceCtrlVirtualControllerDriver * | driver | ) |
Register virtual controller driver.
This function always overwrites global settings and not exist unregister method.
| [in] | driver | - See SceCtrlVirtualControllerDriver |
| int ksceCtrlUpdateMaskForNonShell | ( | int | clear_mask, |
| int | set_mask | ||
| ) |
Update ctrl mask for non shell process.
| [in] | clear_mask | - The SceCtrlButtons type value |
| [in] | set_mask | - The SceCtrlButtons type value |
note - Some values cannot be clear/set.
| int ksceCtrlUpdateMaskForAll | ( | int | clear_mask, |
| int | set_mask | ||
| ) |
Update ctrl mask for all process.
| [in] | clear_mask | - The SceCtrlButtons type value |
| [in] | set_mask | - The SceCtrlButtons type value |
note - Some values cannot be clear/set.
| int ksceCtrlGetMaskForNonShell | ( | uint32_t * | mask | ) |
Get ctrl mask for non shell process.
| [out] | mask | - The pointer of SceCtrlButtons type value output |
| int ksceCtrlGetMaskForAll | ( | uint32_t * | mask | ) |
Get ctrl mask for all process.
| [out] | mask | - The pointer of SceCtrlButtons type value output |
| int(* SceCtrlVirtualControllerDriver::readButtons) (int port, SceCtrlData *pad_data, int count) |
| int(* SceCtrlVirtualControllerDriver::setActuator) (int port, const SceCtrlActuator *pState) |
| int(* SceCtrlVirtualControllerDriver::getBatteryInfo) (int port, SceUInt8 *batt) |
| int(* SceCtrlVirtualControllerDriver::disconnect) (int port) |
| int(* SceCtrlVirtualControllerDriver::setTurnOffInterval) (int port) |
| int(* SceCtrlVirtualControllerDriver::getActiveControllerPort) (void) |
| int(* SceCtrlVirtualControllerDriver::changePortAssign) (int port1, int port2) |
| int(* SceCtrlVirtualControllerDriver::unk0) (void) |
| int(* SceCtrlVirtualControllerDriver::getControllerPortInfo) (SceCtrlPortInfo *info) |
| int(* SceCtrlVirtualControllerDriver::resetLightBar) (int port) |
| int(* SceCtrlVirtualControllerDriver::unk1) (int port) |
| int(* SceCtrlVirtualControllerDriver::singleControllerMode) (int port) |