src/video/x11/SDL_x11gamma.c
changeset 90 ee1f71c10889
parent 0 74212992fb08
child 100 a1c973c35fef
equal deleted inserted replaced
89:69b8fac3e1c0 90:ee1f71c10889
    35 #define MIN_GAMMA (1.0/MAX_GAMMA)
    35 #define MIN_GAMMA (1.0/MAX_GAMMA)
    36 
    36 
    37 static int X11_SetGammaNoLock(_THIS, float red, float green, float blue)
    37 static int X11_SetGammaNoLock(_THIS, float red, float green, float blue)
    38 {
    38 {
    39 #ifdef XFREE86_VMGAMMA
    39 #ifdef XFREE86_VMGAMMA
    40     if (use_vidmode) {
    40     if (use_vidmode >= 2) {
    41         XF86VidModeGamma gamma;
    41         XF86VidModeGamma gamma;
    42         Bool succeeded;
    42         Bool succeeded;
    43 
    43 
    44 	/* Clamp the gamma values */
    44 	/* Clamp the gamma values */
    45 	if ( red < MIN_GAMMA ) {
    45 	if ( red < MIN_GAMMA ) {
    96 }
    96 }
    97 
    97 
    98 static int X11_GetGammaNoLock(_THIS, float *red, float *green, float *blue)
    98 static int X11_GetGammaNoLock(_THIS, float *red, float *green, float *blue)
    99 {
    99 {
   100 #ifdef XFREE86_VMGAMMA
   100 #ifdef XFREE86_VMGAMMA
   101     if (use_vidmode) {
   101     if (use_vidmode >= 2) {
   102         XF86VidModeGamma gamma;
   102         XF86VidModeGamma gamma;
   103         if (XVidMode(GetGamma, (SDL_Display, SDL_Screen, &gamma))) {
   103         if (XVidMode(GetGamma, (SDL_Display, SDL_Screen, &gamma))) {
   104             *red   = gamma.red;
   104             *red   = gamma.red;
   105             *green = gamma.green;
   105             *green = gamma.green;
   106             *blue  = gamma.blue;
   106             *blue  = gamma.blue;