Home button and backlight timeout in user mode

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
benji
Posts: 17
Joined: Fri Oct 14, 2005 2:41 pm

Home button and backlight timeout in user mode

Post by benji »

Sorry for the weird topic, I tried to keep it short but descriptive... and this seems to be a weird problem.

Say you have an app with a main thread running in kernel mode; eventually if you don't touch anything, the back light will auto shut off (depending on your Power Save settings). You hit a key to come back to the app, all is good.

Say this app has a main "loop" that executes every vertical, part of that loop consists in polling the key data. If you're running in kernel mode, all will be good, the back light will shut off, a key press will bring you back to your app.

However, if your main thread was running in user mode, when you poll the keys, the Home button will be down just before the back light shut off kicks in... so this triggers an exit and the app just quits successfully.

Could anyone shed some light as to why this is happenning? Is there a better way to exit an app with a main thread running in user mode? If I don't poll for the home key every frame, when the exit callback gets invoked and I select yes to quit the game, it stays at the "Please Wait..." screen. Which has been documented on the wiki, but are there workarounds?

Thanks,

benji

edit: I forgot to mention this only seems to happen when the usb module is loaded and active.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

You sometimes get a "home" button down event when the backlight turns off. I noticed this earlier (see log for rev 574 in psp svn repo). But you don't need to pay attention to the home button anyway, so just ignore it. Set a flag in your exit callback and check that instead.
Post Reply