comparison src/video/x11/SDL_x11gamma.c @ 1361:19418e4422cb

New configure-based build system. Still work in progress, but much improved
author Sam Lantinga <slouken@libsdl.org>
date Thu, 16 Feb 2006 10:11:48 +0000
parents c9b51268668f
children d910939febfa
comparison
equal deleted inserted replaced
1360:70a9cfb4cf1b 1361:19418e4422cb
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 #include "SDL.h" 23 #include "SDL.h"
24 #include "SDL_events.h" 24 #include "SDL_events.h"
25 #include "SDL_events_c.h" 25 #include "../../events/SDL_events_c.h"
26 #include "SDL_x11video.h" 26 #include "SDL_x11video.h"
27 27
28 /* From the X server sources... */ 28 /* From the X server sources... */
29 #define MAX_GAMMA 10.0 29 #define MAX_GAMMA 10.0
30 #define MIN_GAMMA (1.0/MAX_GAMMA) 30 #define MIN_GAMMA (1.0/MAX_GAMMA)
31 31
32 static int X11_SetGammaNoLock(_THIS, float red, float green, float blue) 32 static int X11_SetGammaNoLock(_THIS, float red, float green, float blue)
33 { 33 {
34 #ifdef XFREE86_VMGAMMA 34 #if SDL_VIDEO_DRIVER_X11_VIDMODE
35 if (use_vidmode >= 200) { 35 if (use_vidmode >= 200) {
36 SDL_NAME(XF86VidModeGamma) gamma; 36 SDL_NAME(XF86VidModeGamma) gamma;
37 Bool succeeded; 37 Bool succeeded;
38 38
39 /* Clamp the gamma values */ 39 /* Clamp the gamma values */
90 return(result); 90 return(result);
91 } 91 }
92 92
93 static int X11_GetGammaNoLock(_THIS, float *red, float *green, float *blue) 93 static int X11_GetGammaNoLock(_THIS, float *red, float *green, float *blue)
94 { 94 {
95 #ifdef XFREE86_VMGAMMA 95 #if SDL_VIDEO_DRIVER_X11_VIDMODE
96 if (use_vidmode >= 200) { 96 if (use_vidmode >= 200) {
97 SDL_NAME(XF86VidModeGamma) gamma; 97 SDL_NAME(XF86VidModeGamma) gamma;
98 if (SDL_NAME(XF86VidModeGetGamma)(SDL_Display, SDL_Screen, &gamma)) { 98 if (SDL_NAME(XF86VidModeGetGamma)(SDL_Display, SDL_Screen, &gamma)) {
99 *red = gamma.red; 99 *red = gamma.red;
100 *green = gamma.green; 100 *green = gamma.green;