comparison 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
comparison
equal deleted inserted replaced
1782:23fe15f88c03 1783:c546353b1ad4
43 #if SDL_VIDEO_DRIVER_X11_VIDMODE 43 #if SDL_VIDEO_DRIVER_X11_VIDMODE
44 #include "../Xext/extensions/xf86vmode.h" 44 #include "../Xext/extensions/xf86vmode.h"
45 #endif 45 #endif
46 #if SDL_VIDEO_DRIVER_X11_XME 46 #if SDL_VIDEO_DRIVER_X11_XME
47 #include "../Xext/extensions/xme.h" 47 #include "../Xext/extensions/xme.h"
48 #endif
49 #if SDL_VIDEO_DRIVER_X11_DPMS
50 #include <X11/extensions/dpms.h>
48 #endif 51 #endif
49 52
50 #include "SDL_x11dyn.h" 53 #include "SDL_x11dyn.h"
51 54
52 /* Hidden "this" pointer for the video functions */ 55 /* Hidden "this" pointer for the video functions */
149 int *XPixels; /* pixels value allocation counts */ 152 int *XPixels; /* pixels value allocation counts */
150 float gamma_saved[3]; /* Saved gamma values for VidMode gamma */ 153 float gamma_saved[3]; /* Saved gamma values for VidMode gamma */
151 int gamma_changed; /* flag: has VidMode gamma been modified? */ 154 int gamma_changed; /* flag: has VidMode gamma been modified? */
152 155
153 short *iconcolors; /* List of colors used by the icon */ 156 short *iconcolors; /* List of colors used by the icon */
157
158 /* Screensaver settings */
159 int screensaver_timeout;
160 #if SDL_VIDEO_DRIVER_X11_DPMS
161 BOOL dpms_enabled;
162 #endif
154 }; 163 };
155 164
156 /* Old variable names */ 165 /* Old variable names */
157 #define local_X11 (this->hidden->local_X11) 166 #define local_X11 (this->hidden->local_X11)
158 #define SDL_Display (this->hidden->X11_Display) 167 #define SDL_Display (this->hidden->X11_Display)
199 #define SDL_XColorMap (this->hidden->XColorMap) 208 #define SDL_XColorMap (this->hidden->XColorMap)
200 #define SDL_XPixels (this->hidden->XPixels) 209 #define SDL_XPixels (this->hidden->XPixels)
201 #define gamma_saved (this->hidden->gamma_saved) 210 #define gamma_saved (this->hidden->gamma_saved)
202 #define gamma_changed (this->hidden->gamma_changed) 211 #define gamma_changed (this->hidden->gamma_changed)
203 #define SDL_iconcolors (this->hidden->iconcolors) 212 #define SDL_iconcolors (this->hidden->iconcolors)
213 #define screensaver_timeout (this->hidden->screensaver_timeout)
214 #define dpms_enabled (this->hidden->dpms_enabled)
204 /* Some versions of XFree86 have bugs - detect if this is one of them */ 215 /* Some versions of XFree86 have bugs - detect if this is one of them */
205 #define BUGGY_XFREE86(condition, buggy_version) \ 216 #define BUGGY_XFREE86(condition, buggy_version) \
206 ((SDL_strcmp(ServerVendor(SDL_Display), "The XFree86 Project, Inc") == 0) && \ 217 ((SDL_strcmp(ServerVendor(SDL_Display), "The XFree86 Project, Inc") == 0) && \
207 (VendorRelease(SDL_Display) condition buggy_version)) 218 (VendorRelease(SDL_Display) condition buggy_version))
208 219