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 

Detect if Suspend called by Idle or by Power Switch.

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



Joined: 28 May 2008
Posts: 842

PostPosted: Fri Sep 19, 2008 12:41 pm    Post subject: Detect if Suspend called by Idle or by Power Switch. Reply with quote

How do I check if a suspend event was initiated by the PSP being idle and trying to shut off, or if the user pressed the power switch.

I already have a sysevent handler for suspend in my app BTW.
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Fri Sep 19, 2008 7:57 pm    Post subject: Reply with quote

See the power callback sample in the SDK.

PSP_POWER_CB_POWER_SWITCH is when the switch is pressed.
PSP_POWER_CB_SUSPENDING is when it's called by the system automatically.
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Sep 22, 2008 3:44 am    Post subject: Reply with quote

Thanks. Used it in Hold+ v2.71
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