PSPSDK 2026-01-13
Loading...
Searching...
No Matches
Example

Sets a button mask mode for one or more buttons.

Sets a button mask mode for one or more buttons.You can only mask user mode buttons in user applications. Masking of kernel mode buttons is ignored as well as buttons used in kernel mode applications.

Parameters
buttonsThe button value for which the button mask mode will be applied for. One or more buttons of SceCtrlButtons.
mask_modeSpecifies the type of the button mask. One of SceCtrlButtonMaskMode.
Returns
The previous button mask type for the given buttons. One of SceCtrlButtonMaskMode.

:

sceCtrlSetButtonIntercept(0xFFFF, 1); // Mask lower 16bits
sceCtrlSetButtonIntercept(0x10000, 2); // Always return HOME key
// Do something
sceCtrlSetButtonIntercept(0x10000, 0); // Unset HOME key
sceCtrlSetButtonIntercept(0xFFFF, 0); // Unset mask
u32 sceCtrlSetButtonIntercept(u32 buttons, u32 mask_mode)