forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

padbutton_blocker

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
fr34k*



Joined: 31 Aug 2007
Posts: 17

PostPosted: Fri Sep 28, 2007 5:23 am    Post subject: padbutton_blocker Reply with quote

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
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Fri Sep 28, 2007 5:26 am    Post subject: Reply with quote

What? Gropes? :[
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Fri Sep 28, 2007 5:27 am    Post subject: Reply with quote

What? Gropes? :[
Back to top
View user's profile Send private message
fr34k*



Joined: 31 Aug 2007
Posts: 17

PostPosted: Fri Sep 28, 2007 5:29 am    Post subject: Reply with quote

ohh sry I mean pad buttons!
_________________
SORRY FOR MY BAD ENGLISH!!!!!
Back to top
View user's profile Send private message
fr34k*



Joined: 31 Aug 2007
Posts: 17

PostPosted: Fri Sep 28, 2007 6:30 am    Post subject: Reply with quote

*PUSH*
Can nobody help me?? :'(
_________________
SORRY FOR MY BAD ENGLISH!!!!!
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Fri Sep 28, 2007 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message
fr34k*



Joined: 31 Aug 2007
Posts: 17

PostPosted: Fri Sep 28, 2007 7:40 am    Post subject: Reply with quote

Yes I want to block the buttons in teh whole system!
_________________
SORRY FOR MY BAD ENGLISH!!!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group