Commit 92091bf9 authored by Sam Lantinga's avatar Sam Lantinga

Don't disable the screen saver by default for windows applications

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403490
parent 3c5fca04
...@@ -377,7 +377,7 @@ ClearVideoSurface() ...@@ -377,7 +377,7 @@ ClearVideoSurface()
} }
static void static void
SetupScreenSaver() SetupScreenSaver(int flags)
{ {
const char *env; const char *env;
SDL_bool allow_screensaver; SDL_bool allow_screensaver;
...@@ -386,8 +386,10 @@ SetupScreenSaver() ...@@ -386,8 +386,10 @@ SetupScreenSaver()
env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER"); env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER");
if (env) { if (env) {
allow_screensaver = SDL_atoi(env) ? SDL_TRUE : SDL_FALSE; allow_screensaver = SDL_atoi(env) ? SDL_TRUE : SDL_FALSE;
} else { } else if (flags & SDL_FULLSCREEN) {
allow_screensaver = SDL_FALSE; allow_screensaver = SDL_FALSE;
} else {
allow_screensaver = SDL_TRUE;
} }
if (allow_screensaver) { if (allow_screensaver) {
SDL_EnableScreenSaver(); SDL_EnableScreenSaver();
...@@ -700,7 +702,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) ...@@ -700,7 +702,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
ClearVideoSurface(); ClearVideoSurface();
SetupScreenSaver(); SetupScreenSaver(flags);
/* We're finally done! */ /* We're finally done! */
return SDL_PublicSurface; return SDL_PublicSurface;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment