 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
MadButch
Joined: 20 Aug 2005 Posts: 16
|
Posted: Sun Sep 04, 2005 2:03 am Post subject: Home control question (closing app functionality). |
|
|
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 |
|
 |
matkeupon
Joined: 02 Jul 2005 Posts: 26
|
Posted: Sun Sep 04, 2005 4:20 am Post subject: |
|
|
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 |
|
 |
|
|
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
|