PSPSDK 2024-10-31
|
Controller latch data. More...
#include <ctrl/pspctrl.h>
Data Fields | |
unsigned int | uiMake |
Button transitioned to pressed state. | |
unsigned int | uiBreak |
Button transitioned to released state. | |
unsigned int | uiPress |
Button is in the pressed state. | |
unsigned int | uiRelease |
Button is in the released state. | |
Controller latch data.
Contains information about button state changes between two controller service sampling cycles. With each sampling cycle, the controller service compares the new pressed & releasedbutton states with the previously collected pressed button states. This comparison will result in the following possible states for each button:
It is possible for a button to (briefly) be in two states at the same time. Valid combinations are as follows:
In other words, if a button is in the Make state, then it is also in the Press state. However, this is not the case for the inverse. A button in the Press state does not need to be in the Make state.
Mask the values with one or more PspCtrlButtons flags to access specific buttons.
These comparison results are stored internally as latch data and can be retrieved using the APIs sceCtrlPeekLatch() and sceCtrlReadLatch().