[SDL] SDL tampers with display power settings on the sly
nbs at sonic.net
Tue Feb 26 17:20:08 PST 2008
On Tue, Feb 26, 2008 at 02:25:09PM +0100, Erik wrote:
> I added SDL_VIDEO_ALLOW_SCREENSAVER=1 to ~/.bashrc and added the
> following line to an application, before SDL_Init:
> setenv("SDL_VIDEO_ALLOW_SCREENSAVER", "1", 0);
I did a "putenv("SDL_VIDEO_ALLOW_SCREENSAVER=1");" in Tux Paint CVS
(soon to be released as 0.9.19), but only if "--allowscreensaver" is used.
This issue (disabling screensaver) was, in fact, reported as a bug for
Tux Paint. (Wait -- wasn't that why SDL added this env var in the first
place? I'd have to check the archives. :^) )
Tux Paint, since it is an app, and is often run full-screen, and can be
made relatively 'safe' (disable Quit button to keep sneaky kids out of your
tax files). So in my opinion, disabling screensaver was not a bad idea.
Of course, this is in watching my 14 month old son play with it (usually
smashing mouse on desk or keyboard), then wandering off to play with other
toys, then coming back to it later.
Having to get up and unlock my screen constantly would be annoying.
But... I can't argue with ALLOWING the screensaver, hence adding the option
to ask SDL to do that.
Sadly, SDL on my Ubuntu 7.10 boxes is not new enough to support it,
so I haven't been able to _confirm_ that it works, but I trust y'all. :)
bill at newbreedsoftware.com
More information about the SDL