| View previous topic :: View next topic |
| Author |
Message |
hardrive
Joined: 17 Mar 2006 Posts: 11
|
Posted: Thu Apr 03, 2008 9:58 am Post subject: SDL Home key input |
|
|
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: |
...
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? |
|
| Back to top |
|
 |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Thu Apr 03, 2008 10:04 am Post subject: |
|
|
| I'd imagine it'd only register if your application is in kernel mode. Is it? |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Apr 03, 2008 11:05 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
hardrive
Joined: 17 Mar 2006 Posts: 11
|
Posted: Thu Apr 03, 2008 11:43 am Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Thu Apr 03, 2008 11:48 am Post subject: |
|
|
| Because the home button is normally caught by the PSP OS to display the home screen. It isn't handled by games. |
|
| Back to top |
|
 |
|