Prevent screen from dimming during game

Nibbie
Posts: 2
Joined: 2009.05
Post: #1
My game is controlled solely using the accelerometer, so without any touches occurring, the screen dims after a few minutes of gameplay (as described here: http://forums.macrumors.com/showthread.php?t=532241). I suppose I could synthesize a touch event every minute or so, but perhaps there's an easier way. Any ideas on how to stop this from occurring? Thanks in advance!
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #2
Look at UIApplication's setIdleTimerDisabled method.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.05
Post: #3
AnotherJake Wrote:Look at UIApplication's setIdleTimerDisabled method.

AnotherJake,

Thanks for the response. I was just coming back to post that I had found the answer. Here's the helpful link:
http://www.garagegames.com/community/blogs/view/17211

npatrick6

P.S. Thanks for the GBMusicTrack library as well!
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #4
Always glad to help Smile
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Prevent 3rd party lib from messing up gl kendric 6 4,132 Sep 15, 2009 06:56 PM
Last Post: kendric
  How to prevent my app from closing the user's currently playing music? AdrianM 4 4,642 Aug 5, 2009 03:21 AM
Last Post: AdrianM
  Prevent iPhone SnapShot? Graphic Ace 5 3,559 Mar 29, 2009 08:49 AM
Last Post: Graphic Ace