diff src/video/x11/SDL_x11gamma.c @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
children
line wrap: on
line diff
--- a/src/video/x11/SDL_x11gamma.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/video/x11/SDL_x11gamma.c	Mon May 29 04:04:35 2006 +0000
@@ -31,11 +31,11 @@
 #define MIN_GAMMA (1.0/MAX_GAMMA)
 
 static int
-X11_SetGammaNoLock (_THIS, float red, float green, float blue)
+X11_SetGammaNoLock(_THIS, float red, float green, float blue)
 {
 #if SDL_VIDEO_DRIVER_X11_VIDMODE
     if (use_vidmode >= 200) {
-        SDL_NAME (XF86VidModeGamma) gamma;
+        SDL_NAME(XF86VidModeGamma) gamma;
         Bool succeeded;
 
         /* Clamp the gamma values */
@@ -60,11 +60,11 @@
         } else {
             gamma.blue = blue;
         }
-        if (SDL_GetAppState () & SDL_APPACTIVE) {
+        if (SDL_GetAppState() & SDL_APPACTIVE) {
             succeeded =
-                SDL_NAME (XF86VidModeSetGamma) (SDL_Display, SDL_Screen,
-                                                &gamma);
-            XSync (SDL_Display, False);
+                SDL_NAME(XF86VidModeSetGamma) (SDL_Display, SDL_Screen,
+                                               &gamma);
+            XSync(SDL_Display, False);
         } else {
             gamma_saved[0] = gamma.red;
             gamma_saved[1] = gamma.green;
@@ -77,29 +77,29 @@
         return succeeded ? 0 : -1;
     }
 #endif
-    SDL_SetError ("Gamma correction not supported");
+    SDL_SetError("Gamma correction not supported");
     return -1;
 }
 
 int
-X11_SetVidModeGamma (_THIS, float red, float green, float blue)
+X11_SetVidModeGamma(_THIS, float red, float green, float blue)
 {
     int result;
 
-    SDL_Lock_EventThread ();
-    result = X11_SetGammaNoLock (this, red, green, blue);
-    SDL_Unlock_EventThread ();
+    SDL_Lock_EventThread();
+    result = X11_SetGammaNoLock(this, red, green, blue);
+    SDL_Unlock_EventThread();
 
     return (result);
 }
 
 static int
-X11_GetGammaNoLock (_THIS, float *red, float *green, float *blue)
+X11_GetGammaNoLock(_THIS, float *red, float *green, float *blue)
 {
 #if SDL_VIDEO_DRIVER_X11_VIDMODE
     if (use_vidmode >= 200) {
-        SDL_NAME (XF86VidModeGamma) gamma;
-        if (SDL_NAME (XF86VidModeGetGamma)
+        SDL_NAME(XF86VidModeGamma) gamma;
+        if (SDL_NAME(XF86VidModeGetGamma)
             (SDL_Display, SDL_Screen, &gamma)) {
             *red = gamma.red;
             *green = gamma.green;
@@ -113,24 +113,24 @@
 }
 
 int
-X11_GetVidModeGamma (_THIS, float *red, float *green, float *blue)
+X11_GetVidModeGamma(_THIS, float *red, float *green, float *blue)
 {
     int result;
 
-    SDL_Lock_EventThread ();
-    result = X11_GetGammaNoLock (this, red, green, blue);
-    SDL_Unlock_EventThread ();
+    SDL_Lock_EventThread();
+    result = X11_GetGammaNoLock(this, red, green, blue);
+    SDL_Unlock_EventThread();
 
     return (result);
 }
 
 void
-X11_SaveVidModeGamma (_THIS)
+X11_SaveVidModeGamma(_THIS)
 {
     /* Try to save the current gamma, otherwise disable gamma control */
-    if (X11_GetGammaNoLock (this,
-                            &gamma_saved[0], &gamma_saved[1],
-                            &gamma_saved[2]) < 0) {
+    if (X11_GetGammaNoLock(this,
+                           &gamma_saved[0], &gamma_saved[1],
+                           &gamma_saved[2]) < 0) {
         this->SetGamma = 0;
         this->GetGamma = 0;
     }
@@ -138,7 +138,7 @@
 }
 
 void
-X11_SwapVidModeGamma (_THIS)
+X11_SwapVidModeGamma(_THIS)
 {
     float new_gamma[3];
 
@@ -146,9 +146,9 @@
         new_gamma[0] = gamma_saved[0];
         new_gamma[1] = gamma_saved[1];
         new_gamma[2] = gamma_saved[2];
-        X11_GetGammaNoLock (this, &gamma_saved[0], &gamma_saved[1],
-                            &gamma_saved[2]);
-        X11_SetGammaNoLock (this, new_gamma[0], new_gamma[1], new_gamma[2]);
+        X11_GetGammaNoLock(this, &gamma_saved[0], &gamma_saved[1],
+                           &gamma_saved[2]);
+        X11_SetGammaNoLock(this, new_gamma[0], new_gamma[1], new_gamma[2]);
     }
 }