[SDL] SDL tampers with display power settings on the sly

Erik esigra at gmail.com
Mon Feb 25 04:20:34 PST 2008


Solra Bizna skrev:
> On Mon, Feb 25, 2008 at 3:29 AM, Erik <esigra at gmail.com> wrote:
>   
>>  I get the point about media players, but games?!? Games are interactive
>>  like most other programs. It is not like people start a game and then
>>  just sit there watching it without doing anything at all for several
>>  minutes.
>>     
> Gamepads.
> Halo for Mac, for instance, doesn't disable the screensaver. When my
> sister is playing it with her gamepad, she has to move the computer's
> mouse every 10 minutes or the screensaver comes up mid-game.
> Usually it happens in the middle of a firefight.
>   

That is a bug in the input handling. The system seems to forget to reset 
the screensaver countdown when an event comes from certain input 
devices. It should of course be fixed by treating that input as any 
other input that comes from keyboards and mice. Just disabling the 
screensaver is an ugly hack to work around that bug and causes other bugs.


>> That is the wrong question. It should be "Does that happen properly in
>> *every* application in *every* codepath, even if an exception is thrown,
>> the process is killed or something similar?" And even if it would be
>> guaranteed to restore the setting at exit, it would still be broken
>> while the program is running (even in background).
>>     
> SIGKILL a fullscreen app that's grabbed the mouse. Like the
> screensaver, what results is not something SDL or any other client
> code can fix. It's a fundamental problem with X11.
> If you really want to fix this problem on Linux, beg the Xorg
> developers for some sort of "temporarily disable screensaver while
> this client is running" command.
>   

Do you happen to know of any bug report? I can not be the first one to 
run into this problem.



More information about the SDL mailing list