Disable iPhone Auto-Lock

Previous topic - Next topic

Dark Schneider

For games does not use the touch screen, this is needed, I don't know if GLBasic includes a way to do this, if not, it would be good to add it. Here is the way to do it (in the "The Automatic Sleep Timer" section):

http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/RuntimeEnvironment/RuntimeEnvironment.html

and for OS 3 or later, there is need to do:

http://stackoverflow.com/questions/1058717/idletimerdisabled-not-working-since-iphone-3-0

that is the sequence =NO and then =YES.

An example using it in code:
http://www.torquepowered.com/community/blogs/view/17211

I'd like to insert by myself but I don't know how to do it, as it must be called inside the app because the shared UIApplication.

This functions can be expanded to all systems with energy saving, like Windows or Linux, so if you play with a PAD don't allow to screen saver to popup.