diff src/video/x11/SDL_x11video.h @ 1783:c546353b1ad4

Fixed bug #203 Disable screensaver and DPMS blanking while SDL app is running.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 08 May 2006 06:38:13 +0000
parents c2c6ff414ef5
children 5652192b9c8b
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.h	Mon May 08 06:23:11 2006 +0000
+++ b/src/video/x11/SDL_x11video.h	Mon May 08 06:38:13 2006 +0000
@@ -46,6 +46,9 @@
 #if SDL_VIDEO_DRIVER_X11_XME
 #include "../Xext/extensions/xme.h"
 #endif
+#if SDL_VIDEO_DRIVER_X11_DPMS
+#include <X11/extensions/dpms.h>
+#endif
 
 #include "SDL_x11dyn.h"
 
@@ -151,6 +154,12 @@
     int gamma_changed;		/* flag: has VidMode gamma been modified? */
 
     short *iconcolors;		/* List of colors used by the icon */
+
+    /* Screensaver settings */
+    int screensaver_timeout;
+#if SDL_VIDEO_DRIVER_X11_DPMS
+    BOOL dpms_enabled;
+#endif
 };
 
 /* Old variable names */
@@ -201,6 +210,8 @@
 #define gamma_saved		(this->hidden->gamma_saved)
 #define gamma_changed		(this->hidden->gamma_changed)
 #define SDL_iconcolors		(this->hidden->iconcolors)
+#define screensaver_timeout	(this->hidden->screensaver_timeout)
+#define dpms_enabled		(this->hidden->dpms_enabled)
 /* Some versions of XFree86 have bugs - detect if this is one of them */
 #define BUGGY_XFREE86(condition, buggy_version) \
 ((SDL_strcmp(ServerVendor(SDL_Display), "The XFree86 Project, Inc") == 0) && \