Sleep Mode never interrupting my game

Member
Posts: 110
Joined: 2009.07
Post: #1
Hi folks,

I have an openGL game running on an iPod Touch. It's derived from an NSView (i.e. it's based on EAGLView) NOT NSViewController).

When I run my game, the iPhone never goes into sleep mode. Any clues as to what I might be missing? Rather naively, I thought the sleep thing just... happened. I don't believe I'm over-riding it... at least not intentionally.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #2
Are you setting the application's disableIdleTimer to YES? Or playing music will prevent hard sleep from happening.
Quote this message in a reply
Member
Posts: 110
Joined: 2009.07
Post: #3
Josh Wrote:Are you setting the application's disableIdleTimer to YES? Or playing music will prevent hard sleep from happening.

I don't believe I'm setting disableIdleTimer to Yes. I am using both the openAL library and openAL to play music and sound effects. Would either of those have an effect?

Thanks for the help.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #4
See http://developer.apple.com/iphone/librar...ryPlayback. It discusses what types of audio sessions keep the iPod awake.
Quote this message in a reply
Member
Posts: 110
Joined: 2009.07
Post: #5
I've just found out what the problem was: rank stupidity on my part.

I've only just started deploying my apps to my iPhone and... uh...
...didn't realise that apps are *never* interrupted by sleep mode if you are debugging them.

I'm writing this out of scientific diligence, so that other newbies like myself will not suffer the same ignominy and humiliation.

I shall now flagellate myself with birch twigs while standing naked in a freezing lake.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Sleep mode kendric 2 2,212 Jul 2, 2009 12:18 PM
Last Post: kendric
  Timer Slows down in sleep mode chrism 13 5,200 Jun 14, 2009 05:36 PM
Last Post: longjumper