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

Erik esigra at gmail.com
Tue Feb 26 23:15:37 PST 2008

Bill Kendrick skrev:
> On Tue, Feb 26, 2008 at 09:45:17PM -0700, Solra Bizna wrote:
>> There would naturally be an "I'm paused. Re-enable the
>> screensaver." command too, which the application would also send at,
>> again, an appropriate time.
> Oh, maybe I missed it when we were discussing SDL 1.3, but will the API allow this?
> (Disable screensaver during gameplay/movie playback/whatever, re-enable it during
> game pause/movie pause/etc.)

That would be easy to do. Just wrap XResetScreenSaver in an API call, 
SDL_ResetScreenSaver, and implement that for other video targets as 
well. The media player just adds such a call in its animation update 
loop. Like I wrote in another reply, that is what mplayer did; 

For the problem with input events that do not go through the X server, 
just call SDL_ResetScreenSaver when SDL receives such an event from a 
gamepad. Since receiving input events from somewhere else than the X 
server while running in X is a broken setup, it should be a configure 

More information about the SDL mailing list