소스 검색

Disable the screensaver by default.

Fixes Bugzilla #2218.
Ryan C. Gordon 12 년 전
부모
커밋
ac32352f09
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/video/SDL_video.c

+ 8 - 0
src/video/SDL_video.c

@@ -504,6 +504,14 @@ SDL_VideoInit(const char *driver_name)
         _this->DestroyWindowFramebuffer = SDL_DestroyWindowTexture;
         _this->DestroyWindowFramebuffer = SDL_DestroyWindowTexture;
     }
     }
 
 
+    /* Disable the screen saver by default. This is a change from <= 2.0.1,
+       but most things using SDL are games or media players; you wouldn't
+       want a screensaver to trigger if you're playing exclusively with a
+       joystick, or passively watching a movie. Things that use SDL but
+       function more like a normal desktop app should explicitly reenable the
+       screensaver. */
+    SDL_DisableScreenSaver();
+
     /* If we don't use a screen keyboard, turn on text input by default,
     /* If we don't use a screen keyboard, turn on text input by default,
        otherwise programs that expect to get text events without enabling
        otherwise programs that expect to get text events without enabling
        UNICODE input won't get any events.
        UNICODE input won't get any events.