|
| enum | OSL_KEY_BITS {
OSL_KEY_SELECT = 1
, OSL_KEY_START = 4
, OSL_KEY_UP = 5
, OSL_KEY_RIGHT = 6
,
OSL_KEY_DOWN = 7
, OSL_KEY_LEFT = 8
, OSL_KEY_L = 9
, OSL_KEY_R = 10
,
OSL_KEY_TRIANGLE = 13
, OSL_KEY_CIRCLE = 14
, OSL_KEY_CROSS = 15
, OSL_KEY_SQUARE = 16
,
OSL_KEY_HOME = 17
, OSL_KEY_HOLD = 18
, OSL_KEY_NOTE = 24
} |
| | Bit number for each key in the 'value' field. More...
|
| |
| enum | OSL_KEY_MASKS |
| | Mask for each key in the 'value' field. More...
|
| |
|
| OSL_CONTROLLER * | oslReadKeys () |
| | Reads the current controller state and stores the result in the osl_pad structure.
|
| |
| int | oslSetReadKeysFunction (int(*sceCtrlReadBufferPositive)(SceCtrlData *pad_data, int count)) |
| | Sets an external function to read keys.
|
| |
| int | oslUnsetReadKeysFunction () |
| | Unsets the function set with oslSetReadKeysFunction.
|
| |
| int | oslSetHoldForAnalog (int holdForAnalog) |
| | Decides if HOLD will affect the analog stick.
|
| |
| int | oslWaitKey () |
| | Waits for a key and returns its code.
|
| |
| int | oslKbhit () |
| | Determines whether a key is currently buffered and returns its code.
|
| |
|
void | oslFlushKey () |
| | Flushes the key buffer, removing the pending key.
|
| |
| OSL_REMOTECONTROLLER * | oslReadRemoteKeys () |
| | Reads the current remote controller state and stores the result in the osl_remote structure.
|
| |
|
void | oslFlushRemoteKey () |
| | Flushes the remote key buffer, removing the pending key.
|
| |
| int | oslIsRemoteExist () |
| | Determines whether the remote is plugged in.
|
| |
Controller functions in OSLib.
◆ oslSetKeyAutorepeat
| #define oslSetKeyAutorepeat |
( |
|
keys, |
|
|
|
init, |
|
|
|
interval |
|
) |
| (osl_keys->autoRepeatMask = keys, osl_keys->autoRepeatInit = init, osl_keys->autoRepeatInterval = interval) |
Sets the auto-repeat parameters for keys.
- Parameters
-
| keys | The keys affected by the auto-repeat feature. |
| init | Time (in number of calls) before the auto-repeat feature turns on. |
| interval | Time interval between each key repeat when the auto-repeat has been turned on. |
◆ oslSetKeyAutorepeatMask
| #define oslSetKeyAutorepeatMask |
( |
|
mask | ) |
(osl_keys->autoRepeatMask = mask) |
Sets the key auto-repeat mask.
- Parameters
-
| mask | The key auto-repeat mask. |
◆ oslSetKeyAutorepeatInit
| #define oslSetKeyAutorepeatInit |
( |
|
value | ) |
(osl_keys->autoRepeatInit = value) |
Sets the key auto-repeat initialization value.
- Parameters
-
| value | The initialization value for auto-repeat. |
◆ oslSetKeyAutorepeatInterval
| #define oslSetKeyAutorepeatInterval |
( |
|
value | ) |
(osl_keys->autoRepeatInterval = value) |
Sets the key auto-repeat interval value.
- Parameters
-
| value | The interval value for auto-repeat. |
◆ oslSetKeyAnalogToDPad
| #define oslSetKeyAnalogToDPad |
( |
|
sensivity | ) |
(osl_keys->analogToDPadSensivity = sensivity) |
Enables or disables automatic redirection from the analog stick to D-pad buttons.
- Parameters
-
| sensivity | Sensitivity for the analog press. A typical value is 80. |
◆ oslSetRemoteKeyAutorepeat
Sets the auto-repeat parameters for remote keys.
- Parameters
-
| keys | The keys affected by the auto-repeat feature. |
| init | Time (in number of calls) before the auto-repeat feature turns on. |
| interval | Time interval between each key repeat when the auto-repeat has been turned on. |
◆ oslSetRemoteKeyAutorepeatMask
| #define oslSetRemoteKeyAutorepeatMask |
( |
|
mask | ) |
(osl_remotekeys->autoRepeatMask = mask) |
Sets the remote key auto-repeat mask.
- Parameters
-
| mask | The key auto-repeat mask. |
◆ oslSetRemoteKeyAutorepeatInit
| #define oslSetRemoteKeyAutorepeatInit |
( |
|
value | ) |
(osl_remotekeys->autoRepeatInit = value) |
Sets the remote key auto-repeat initialization value.
- Parameters
-
| value | The initialization value for auto-repeat. |
◆ oslSetRemoteKeyAutorepeatInterval
| #define oslSetRemoteKeyAutorepeatInterval |
( |
|
value | ) |
(osl_remotekeys->autoRepeatInterval = value) |
Sets the remote key auto-repeat interval value.
- Parameters
-
| value | The interval value for auto-repeat. |
◆ OSL_KEY_BITS
Bit number for each key in the 'value' field.
This enumeration defines the bit positions for each key in the value field of OSL_KEYLIST.
| Enumerator |
|---|
| OSL_KEY_SELECT | Select key.
|
| OSL_KEY_START | Start key.
|
| OSL_KEY_UP | Up D-pad key.
|
| OSL_KEY_RIGHT | Right D-pad key.
|
| OSL_KEY_DOWN | Down D-pad key.
|
| OSL_KEY_LEFT | Left D-pad key.
|
| OSL_KEY_L | L shoulder key.
|
| OSL_KEY_R | R shoulder key.
|
| OSL_KEY_TRIANGLE | Triangle key.
|
| OSL_KEY_CIRCLE | Circle key.
|
| OSL_KEY_CROSS | Cross key.
|
| OSL_KEY_SQUARE | Square key.
|
| OSL_KEY_HOME | Home key (may not work in normal operation).
|
| OSL_KEY_HOLD | Hold key (power switch in the opposite direction).
|
| OSL_KEY_NOTE | Note key (may not work).
|
◆ OSL_KEY_MASKS
Mask for each key in the 'value' field.
This enumeration defines the bitmasks for each key in the value field of OSL_KEYLIST.
◆ oslReadKeys()
Reads the current controller state and stores the result in the osl_pad structure.
- Returns
- A pointer to the actual key structure.
◆ oslSetReadKeysFunction()
| int oslSetReadKeysFunction |
( |
int(*)(SceCtrlData *pad_data, int count) |
sceCtrlReadBufferPositive | ) |
|
|
extern |
Sets an external function to read keys.
- Parameters
-
| sceCtrlReadBufferPositive | The external function to read keys. |
- Returns
- 0 on success, non-zero on failure.
◆ oslUnsetReadKeysFunction()
| int oslUnsetReadKeysFunction |
( |
| ) |
|
|
extern |
Unsets the function set with oslSetReadKeysFunction.
- Returns
- 0 on success, non-zero on failure.
◆ oslSetHoldForAnalog()
| int oslSetHoldForAnalog |
( |
int |
holdForAnalog | ) |
|
|
extern |
Decides if HOLD will affect the analog stick.
- Parameters
-
| holdForAnalog | 1 to enable, 0 to disable. |
- Returns
- 0 on success, non-zero on failure.
◆ oslWaitKey()
Waits for a key and returns its code.
- Returns
- The key code.
◆ oslKbhit()
Determines whether a key is currently buffered and returns its code.
- Returns
- The key code if a key is buffered, 0 otherwise.
◆ oslReadRemoteKeys()
Reads the current remote controller state and stores the result in the osl_remote structure.
- Returns
- A pointer to the actual key structure.
◆ oslIsRemoteExist()
Determines whether the remote is plugged in.
- Returns
- 1 if the remote is plugged in, 0 otherwise.
◆ osl_pad
Current keys.
This structure holds the current state of the controller.
◆ osl_remotekeys
Current remote keys.
This structure holds the current state of the remote controller.
◆ osl_remote
Current remote keys.
This structure holds the current state of the remote controller.