src/video/SDL_video.c
changeset 3025 54fac87e1f34
parent 2999 b2025ca5d7a5
child 3029 89f8a72e1ee9
     1.1 --- a/src/video/SDL_video.c	Sun Jan 11 23:56:19 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Mon Jan 12 06:19:05 2009 +0000
     1.3 @@ -2326,6 +2326,45 @@
     1.4      }
     1.5  }
     1.6  
     1.7 +SDL_bool
     1.8 +SDL_IsScreenSaverEnabled()
     1.9 +{
    1.10 +    if (!_this) {
    1.11 +        return SDL_TRUE;
    1.12 +    }
    1.13 +    return _this->suspend_screensaver ? SDL_FALSE : SDL_TRUE;
    1.14 +}
    1.15 +
    1.16 +void
    1.17 +SDL_EnableScreenSaver()
    1.18 +{
    1.19 +    if (!_this) {
    1.20 +        return;
    1.21 +    }
    1.22 +    if (!_this->suspend_screensaver) {
    1.23 +        return;
    1.24 +    }
    1.25 +    _this->suspend_screensaver = SDL_FALSE;
    1.26 +    if (_this->SuspendScreenSaver) {
    1.27 +        _this->SuspendScreenSaver(_this);
    1.28 +    }
    1.29 +}
    1.30 +
    1.31 +void
    1.32 +SDL_DisableScreenSaver()
    1.33 +{
    1.34 +    if (!_this) {
    1.35 +        return;
    1.36 +    }
    1.37 +    if (_this->suspend_screensaver) {
    1.38 +        return;
    1.39 +    }
    1.40 +    _this->suspend_screensaver = SDL_TRUE;
    1.41 +    if (_this->SuspendScreenSaver) {
    1.42 +        _this->SuspendScreenSaver(_this);
    1.43 +    }
    1.44 +}
    1.45 +
    1.46  void
    1.47  SDL_VideoQuit(void)
    1.48  {