My display suffers from insomnia when I enter fullscreen mode

Member
Posts: 208
Joined: 2005.04
Post: #1
I finally got fullscreen mode working properly in my game! Wow

There's a one problem left though...

When in fullscreen mode, the display doesn't want to go to sleep. Is there some way around this? I'd like the display to keep obeying the user's Energy Saver settings. Is there an easy way to do this?

I've been looking at DMRegisterExtendedNotifyProc and kDMNotifyDisplayWillSleep... am I on the right track?

BTW, this is a Cocoa app.


Thanks in advance,

Andrew


PS - many thanks to OneSadCookie for his ridiculously abundant, very helpful posts! I can count the number of times I've run into some coding issue, hit up Google, and found a useful OSC post on iDevGames. Thanks Keith! Grin
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #2
I don't have a solution for you, but I can tell you that at least personally I get very annoyed whenever a fullscreen application lets the display go to sleep... it makes watching a movie/video much less fun! Especially when you have to type in your password to unlock the screensaver...

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Member
Posts: 208
Joined: 2005.04
Post: #3
Steven Wrote:I don't have a solution for you, but I can tell you that at least personally I get very annoyed whenever a fullscreen application lets the display go to sleep... it makes watching a movie/video much less fun! Especially when you have to type in your password to unlock the screensaver...

I'm calling UpdateSystemActivity(UsrActivity); when the user is providing input, so the display won't sleep when the user is playing the game. However, if the user walks away from the game, their display should sleep after the period they specified in Energy Saver. I'd also like to adhere to their Screen Saver settings if possible.

I could simply draw a black screen after a set period, but I'd prefer to relinquish control to the system (and obey the user's system preferences) if that's possible.
Quote this message in a reply
Member
Posts: 208
Joined: 2005.04
Post: #4
I forgot to mention that I'm achieving full screen mode via a second OpenGL context.

That is, I'm not doing something like this:
[fullScreenWindow setLevel:NSScreenSaverWindowLevel-1];
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Mac OS X. Switching between fullscreen and windowed mode. e40pud 2 4,157 Jan 25, 2010 12:01 PM
Last Post: OneSadCookie
  Tricks with dialog boxes in fullscreen mode causing permanent framerate drops. Sea Manky 2 3,048 Aug 7, 2007 06:20 AM
Last Post: Sea Manky
  Fullscreen windowed OpenGL mode maaaaark 8 5,010 Mar 11, 2005 12:34 PM
Last Post: maaaaark
  fullscreen-window mode switch NYGhost 10 5,365 Feb 10, 2005 09:52 AM
Last Post: NYGhost
  OpenGL CGL Switch Between Fullscreen and Windowed Mode thaeez 1 3,266 Jun 30, 2004 04:29 AM
Last Post: OneSadCookie