uOFW
Reverse engineered PSP kernel 6.60.
Data Fields
SceCtrlLatch Struct Reference

#include <ctrl.h>

Data Fields

u32 buttonMake
 
u32 buttonBreak
 
u32 buttonPress
 
u32 buttonRelease
 

Detailed Description

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.

Remarks
The same can be accomplished by using the different sceCtrl[Read/Peek]Buffer[Positive/Negative]() APIs and comparing the currently collected button sampling data with the previously collected one.
See also
sceCtrlPeekLatch()
sceCtrlReadLatch()

Field Documentation

◆ buttonMake

u32 SceCtrlLatch::buttonMake

Button transitioned to pressed state.

◆ buttonBreak

u32 SceCtrlLatch::buttonBreak

Button transitioned to released state.

◆ buttonPress

u32 SceCtrlLatch::buttonPress

Button is in the pressed state.

◆ buttonRelease

u32 SceCtrlLatch::buttonRelease

Button is in the released state.


The documentation for this struct was generated from the following file: