padbutton_blocker

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
fr34k*
Posts: 17
Joined: Fri Aug 31, 2007 6:19 am

padbutton_blocker

Post by fr34k* »

Hello, I want to block some pad buttons and i have this main.c!
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&#40;"padbutton_blocker", 0x1000, 1, 1&#41;;


SceCtrlData pad;
#define PSP_TRIANGLE &#40;pad.Buttons & PSP_CTRL_TRIANGLE&#41;
#define PSP_SQUARE &#40;pad.Buttons & PSP_CTRL_SQUARE&#41;
#define PSP_CIRCLE &#40;pad.Buttons & PSP_CTRL_CIRCLE&#41;
#define PSP_CROSS &#40;pad.Buttons & PSP_CTRL_CROSS&#41;
#define PSP_LTRIGGER &#40;pad.Buttons & PSP_CTRL_LTRIGGER&#41;
#define PSP_RTRIGGER &#40;pad.Buttons & PSP_CTRL_RTRIGGER&#41;
#define PSP_HOME &#40;pad.Buttons & PSP_CTRL_HOME&#41;
#define PSP_START &#40;pad.Buttons & PSP_CTRL_START&#41;
#define PSP_SELECT &#40;pad.Buttons & PSP_CTRL_SELECT&#41;
#define PSP_SCREEN &#40;pad.Buttons & PSP_CTRL_SCREEN&#41;
#define PSP_UP &#40;pad.Buttons & PSP_CTRL_UP&#41;
#define PSP_RIGHT &#40;pad.Buttons & PSP_CTRL_RIGHT&#41;
#define PSP_DOWN &#40;pad.Buttons & PSP_CTRL_DOWN&#41;
#define PSP_LEFT &#40;pad.Buttons & PSP_CTRL_LEFT&#41;
#define PSP_HOLD &#40;pad.Buttons & PSP_CTRL_HOLD&#41;
#define PSP_NOTE &#40;pad.Buttons & PSP_CTRL_NOTE&#41;
#define PSP_VOLUP &#40;pad.Buttons & PSP_CTRL_VOLUP&#41;
#define PSP_VOLDOWN &#40;pad.Buttons & PSP_CTRL_VOLDOWN&#41;

int module_start &#40;SceSize args, void *argp&#41;
&#123;
	sceKernelDelayThread&#40;1000000&#41;;
	sceCtrlReadBufferPositive&#40;&pad, 1&#41;;


                  if&#40;PSP_TRIANGLE&#41;;
		 if&#40;PSP_SQUARE&#41;;
		 if&#40;PSP_CIRCLE&#41;;
                  if&#40;PSP_CROSS&#41;;
                  if&#40;PSP_HOME&#41;;
                  if&#40;PSP_START&#41;;
                  if&#40;PSP_SELECT&#41;;
                  if&#40;PSP_UP&#41;;
                  if&#40;PSP_RIGHT&#41;;
                  if&#40;PSP_DOWN&#41;;
                  if&#40;PSP_LEFT&#41;;
                  if&#40;PSP_HOLD&#41;;
                  if&#40;PSP_NOTE&#41;;

return 0;
&#125;
/* Exported function returns the address of module_info */
void* getModuleInfo&#40;void&#41;
&#123;
return &#40;void *&#41; &module_info;
&#125;
Last edited by fr34k* on Fri Sep 28, 2007 5:29 am, edited 1 time in total.
SORRY FOR MY BAD ENGLISH!!!!!
KickinAezz
Posts: 328
Joined: Sun Jun 03, 2007 10:05 pm

Post by KickinAezz »

What? Gropes? :[
KickinAezz
Posts: 328
Joined: Sun Jun 03, 2007 10:05 pm

Post by KickinAezz »

What? Gropes? :[
fr34k*
Posts: 17
Joined: Fri Aug 31, 2007 6:19 am

Post by fr34k* »

ohh sry I mean pad buttons!
SORRY FOR MY BAD ENGLISH!!!!!
fr34k*
Posts: 17
Joined: Fri Aug 31, 2007 6:19 am

Post by fr34k* »

*PUSH*
Can nobody help me?? :'(
SORRY FOR MY BAD ENGLISH!!!!!
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

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.
fr34k*
Posts: 17
Joined: Fri Aug 31, 2007 6:19 am

Post by fr34k* »

Yes I want to block the buttons in teh whole system!
SORRY FOR MY BAD ENGLISH!!!!!
Post Reply