PSPSDK 2026-01-28
Loading...
Searching...
No Matches
pspctrl_kernel.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspctrl_kernel.h - Prototypes for the sceCtrl_driver library.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
13
14#ifndef __CTRL_KERNEL_H__
15#define __CTRL_KERNEL_H__
16
17#include <psptypes.h>
18
20typedef void (*SceKernelButtonCallbackFunction)(u32 cur_buttons, u32 last_buttons, void *opt);
21
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
66
75
86int sceCtrlSetSpecialButtonCallback(u32 slot, u32 button_mask, SceKernelButtonCallbackFunction callback, void *opt);
87
88/* Just define some random names for the functions to make them easier to use */
89#define sceCtrlSetButtonMasks sceCtrlSetButtonIntercept
90#define sceCtrlGetButtonMask sceCtrlGetButtonIntercept
91#define sceCtrlRegisterButtonCallback sceCtrlSetSpecialButtonCallback
92
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
int sceCtrlSetSpecialButtonCallback(u32 slot, u32 button_mask, SceKernelButtonCallbackFunction callback, void *opt)
Registers a button callback.
void(* SceKernelButtonCallbackFunction)(u32 cur_buttons, u32 last_buttons, void *opt)
The callback function used by sceCtrlSetSpecialButtonCallback().
Definition pspctrl_kernel.h:20
u32 sceCtrlSetButtonIntercept(u32 buttons, u32 mask_mode)
u32 sceCtrlGetButtonIntercept(u32 buttons)
Get button mask mode.
SceCtrlButtonMaskMode
Button mask settings.
Definition pspctrl_kernel.h:23
@ SCE_CTRL_MASK_APPLY_BUTTONS
The specified buttons show up as being pressed, even if the user does not press them.
Definition pspctrl_kernel.h:38
@ SCE_CTRL_MASK_NO_MASK
No mask for the specified buttons.
Definition pspctrl_kernel.h:25
@ SCE_CTRL_MASK_IGNORE_BUTTONS
The specified buttons are ignored, that means even if these buttons are pressed by the user they won'...
Definition pspctrl_kernel.h:32
uint32_t u32
Definition psptypes.h:41