| View previous topic :: View next topic |
| Author |
Message |
fr34k*
Joined: 31 Aug 2007 Posts: 17
|
Posted: Fri Sep 28, 2007 5:23 am Post subject: padbutton_blocker |
|
|
Hello, I want to block some pad buttons and i have this main.c!
But it doesn't work!
Please help me!
| Code: | #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;
} |
_________________ SORRY FOR MY BAD ENGLISH!!!!!
Last edited by fr34k* on Fri Sep 28, 2007 5:29 am; edited 1 time in total |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Fri Sep 28, 2007 5:26 am Post subject: |
|
|
| What? Gropes? :[ |
|
| Back to top |
|
 |
KickinAezz
Joined: 03 Jun 2007 Posts: 328
|
Posted: Fri Sep 28, 2007 5:27 am Post subject: |
|
|
| What? Gropes? :[ |
|
| Back to top |
|
 |
fr34k*
Joined: 31 Aug 2007 Posts: 17
|
Posted: Fri Sep 28, 2007 5:29 am Post subject: |
|
|
ohh sry I mean pad buttons! _________________ SORRY FOR MY BAD ENGLISH!!!!! |
|
| Back to top |
|
 |
fr34k*
Joined: 31 Aug 2007 Posts: 17
|
Posted: Fri Sep 28, 2007 6:30 am Post subject: |
|
|
*PUSH*
Can nobody help me?? :'( _________________ SORRY FOR MY BAD ENGLISH!!!!! |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Fri Sep 28, 2007 7:25 am Post subject: |
|
|
Do you want to block the buttons in the whole system?
If so, how do you think you are gonna do with that code? You would have to catch the syscall and patch it. |
|
| Back to top |
|
 |
fr34k*
Joined: 31 Aug 2007 Posts: 17
|
Posted: Fri Sep 28, 2007 7:40 am Post subject: |
|
|
Yes I want to block the buttons in teh whole system! _________________ SORRY FOR MY BAD ENGLISH!!!!! |
|
| Back to top |
|
 |
|