But it doesn't work!
Please help me!
Code: Select all
#include <pspkernel.h>
#include <stdio.h>
#include <pspsyscon.h>
#include <pspctrl.h>
PSP_MODULE_INFO("padbutton_blocker", 0x1000, 1, 1);
SceCtrlData pad;
#define PSP_TRIANGLE (pad.Buttons & PSP_CTRL_TRIANGLE)
#define PSP_SQUARE (pad.Buttons & PSP_CTRL_SQUARE)
#define PSP_CIRCLE (pad.Buttons & PSP_CTRL_CIRCLE)
#define PSP_CROSS (pad.Buttons & PSP_CTRL_CROSS)
#define PSP_LTRIGGER (pad.Buttons & PSP_CTRL_LTRIGGER)
#define PSP_RTRIGGER (pad.Buttons & PSP_CTRL_RTRIGGER)
#define PSP_HOME (pad.Buttons & PSP_CTRL_HOME)
#define PSP_START (pad.Buttons & PSP_CTRL_START)
#define PSP_SELECT (pad.Buttons & PSP_CTRL_SELECT)
#define PSP_SCREEN (pad.Buttons & PSP_CTRL_SCREEN)
#define PSP_UP (pad.Buttons & PSP_CTRL_UP)
#define PSP_RIGHT (pad.Buttons & PSP_CTRL_RIGHT)
#define PSP_DOWN (pad.Buttons & PSP_CTRL_DOWN)
#define PSP_LEFT (pad.Buttons & PSP_CTRL_LEFT)
#define PSP_HOLD (pad.Buttons & PSP_CTRL_HOLD)
#define PSP_NOTE (pad.Buttons & PSP_CTRL_NOTE)
#define PSP_VOLUP (pad.Buttons & PSP_CTRL_VOLUP)
#define PSP_VOLDOWN (pad.Buttons & PSP_CTRL_VOLDOWN)
int module_start (SceSize args, void *argp)
{
sceKernelDelayThread(1000000);
sceCtrlReadBufferPositive(&pad, 1);
if(PSP_TRIANGLE);
if(PSP_SQUARE);
if(PSP_CIRCLE);
if(PSP_CROSS);
if(PSP_HOME);
if(PSP_START);
if(PSP_SELECT);
if(PSP_UP);
if(PSP_RIGHT);
if(PSP_DOWN);
if(PSP_LEFT);
if(PSP_HOLD);
if(PSP_NOTE);
return 0;
}
/* Exported function returns the address of module_info */
void* getModuleInfo(void)
{
return (void *) &module_info;
}