uOFW
Reverse engineered PSP kernel 6.60.
|
#include <ctrl.h>
Data Fields | |
u32 | buttonMake |
u32 | buttonBreak |
u32 | buttonPress |
u32 | buttonRelease |
This structure represents controller button latch data.
With each sampling cycle, the controller service compares the new pressed & released button states with the previously collected pressed button states. This comparison will result in the following possible states for each button:
• [make]: The button has just been pressed with its prior state being the released state. Transition from 'released' state to 'pressed' state.
• [press]: The button is currently in the 'pressed' state.
• [break]: The button has just been released with its prior state being the 'pressed' state. Transition from 'pressed' state to 'release' state.
• [release]: The button is currently in the 'released' state.
It is possible for a button to (briefly) be in two states at the same time. Valid combinations are as follows:
• [make] & [press]
• [break] & [release]
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.
These comparison results are stored internally as latch data and can be retrieved using the APIs sceCtrlPeekLatch() and sceCtrlReadLatch(). SceCtrlPadButtons can be used to find out the state of each button.
u32 SceCtrlLatch::buttonMake |
Button transitioned to pressed state.
u32 SceCtrlLatch::buttonBreak |
Button transitioned to released state.
u32 SceCtrlLatch::buttonPress |
Button is in the pressed state.
u32 SceCtrlLatch::buttonRelease |
Button is in the released state.