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 

SDL Home key input

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



Joined: 17 Mar 2006
Posts: 11

PostPosted: Thu Apr 03, 2008 9:58 am    Post subject: SDL Home key input Reply with quote

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



Joined: 18 Mar 2007
Posts: 38

PostPosted: Thu Apr 03, 2008 10:04 am    Post subject: Reply with quote

I'd imagine it'd only register if your application is in kernel mode. Is it?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Apr 03, 2008 11:05 am    Post subject: Reply with quote

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



Joined: 17 Mar 2006
Posts: 11

PostPosted: Thu Apr 03, 2008 11:43 am    Post subject: Reply with quote

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



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Apr 03, 2008 11:48 am    Post subject: Reply with quote

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
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