I want to make my prog able to creat a press event, so that I can swap buttons.
although I found these in pspctrl_kernel.h
I can mask keys use sceCtrlSetButtonMasks by passing type 1, but if I pass 2 as type like the sample, it just mask the keys and no return./**
* Set the controller button masks
*
* @param mask - The bits to setup
* @param type - The type of operation (0 clear, 1 set mask, 2 set button)
*
* @par Example:
* @code
* sceCtrl_driver_7CA723DC(0xFFFF, 1); // Mask lower 16bits
* sceCtrl_driver_7CA723DC(0x10000, 2); // Always return HOME key
* // Do something
* sceCtrl_driver_7CA723DC(0x10000, 0); // Unset HOME key
* sceCtrl_driver_7CA723DC(0xFFFF, 0); // Unset mask
* @endcode
*/
void sceCtrlSetButtonMasks(unsigned int mask, unsigned type);
void sceCtrlGetButtonMask(unsigned int mask);
void sceCtrlRegisterButtonCallback(int no, unsigned int mask, void (*cb)(int, int, void*), void *arg);
for example:
sceCtrl_driver_7CA723DC(PSP_CTRL_RTRIGGER, 1); //It mask the R button normally.
sceCtrl_driver_7CA723DC(PSP_CTRL_CROSS, 2); //It should return Cross but actually it just mask the Cross as well .
Can anybody share me some idea?