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 

Home control question (closing app functionality).

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



Joined: 20 Aug 2005
Posts: 16

PostPosted: Sun Sep 04, 2005 2:03 am    Post subject: Home control question (closing app functionality). Reply with quote

When the user exits the application using the HOME control, is there an event I can catch before my application closes?

Normally it wouldn't hinder, but if I don't close my log file, 0 bytes get written to the mem.card. And if I can't catch the HOME control, is there a way to flush a file opened with sceIoOpen?

Thanks for your time,
Michael
Back to top
View user's profile Send private message
matkeupon



Joined: 02 Jul 2005
Posts: 26

PostPosted: Sun Sep 04, 2005 4:20 am    Post subject: Reply with quote

Well, you can catch it the first time with no problem (PSP_CTRL_HOME).

But I don't know how to catch the 2nd event (when the user chooses to really quit the game or cancels). So I don't know when the user returns to the program. You could just close the file when the home button is first pressed, and then put your program in a loop just checking for any keypress. If the program catches another keypress, then you know the user canceled in the home menu. So you can re-open your file and the program can go on.

If someone knows a way to catch keypresses even in the home menu, I'd like to know.
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