Skip to content
Snippets Groups Projects
Commit 09093eee authored by Oliver Behnke's avatar Oliver Behnke
Browse files

SDL changed the way how to enable the system's screesaver

* Switching from obsolete configure option to API call
* Since SDL 2.0.2 screensavers are disabled by default!
* https://wiki.libsdl.org/SDL_IsScreenSaverEnabled
parent 1340b7b9
No related branches found
No related tags found
No related merge requests found
...@@ -331,9 +331,9 @@ build_sdl() ...@@ -331,9 +331,9 @@ build_sdl()
chmod +x configure >> $LOGFILE 2>&1 || failure chmod +x configure >> $LOGFILE 2>&1 || failure
cd $ROOT/build/sdl || failure cd $ROOT/build/sdl || failure
if [ "$1" == "$TARGET_MAC" ]; then if [ "$1" == "$TARGET_MAC" ]; then
$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --enable-screensaver=yes --enable-video-x11=no >> $LOGFILE 2>&1 || failure $ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --enable-video-x11=no >> $LOGFILE 2>&1 || failure
else else
$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --enable-screensaver=yes >> $LOGFILE 2>&1 || failure $ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
fi fi
make >> $LOGFILE 2>&1 || failure make >> $LOGFILE 2>&1 || failure
make install >> $LOGFILE 2>&1 || failure make install >> $LOGFILE 2>&1 || failure
......
...@@ -40,6 +40,12 @@ bool WindowManager::initialize(const int width, const int height, const int fram ...@@ -40,6 +40,12 @@ bool WindowManager::initialize(const int width, const int height, const int fram
atexit(SDL_Quit); atexit(SDL_Quit);
// allow screensaver (or we might block BOINC's own, our parent)
SDL_EnableScreenSaver();
if (SDL_IsScreenSaverEnabled == SDL_FALSE) {
cerr << "Screensavers couldn't be enabled! This might break usage as BOINC screensaver..." << endl;
}
// retrieve current video settings (of the primary display) // retrieve current video settings (of the primary display)
SDL_DisplayMode mode; SDL_DisplayMode mode;
if (!SDL_GetDesktopDisplayMode(0, &mode)) { if (!SDL_GetDesktopDisplayMode(0, &mode)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment