SDL Home key input

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

Moderators: cheriff, TyRaNiD

Post Reply
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

SDL Home key input

Post by hardrive »

I've just been getting into using SDL on the PSP. It works very well, all besides the Home key. I can't get any button press on the Home key to register.

Here's my code:

Code: Select all

...
SDL_Joystick *joy=0;

if(SDL_NumJoysticks()>0)

joy=SDL_JoystickOpen(0);
...
if (SDL_JoystickGetButton(joy, 2) ) { sceKernelExitGame(); }
if (SDL_JoystickGetButton(joy, 12) ) { sceKernelExitGame(); }
If I press the Cross button, the game will exit, but if I press the home button, nothing happens. I don't need this for my game or anything, but I was wondering if anybody else had ran into this problem?
Archaemic
Posts: 38
Joined: Sun Mar 18, 2007 7:23 am

Post by Archaemic »

I'd imagine it'd only register if your application is in kernel mode. Is it?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

For 3.xx user-mode apps, there is a prx floating around that will get the home button for you. It's part of SNES9xTYL, for example.
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

Post by hardrive »

Archaemic wrote:I'd imagine it'd only register if your application is in kernel mode. Is it?
Nope. Why would it only register then?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Because the home button is normally caught by the PSP OS to display the home screen. It isn't handled by games.
Post Reply