]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
removed vid_allowhwgamma variable because vid_activewindow is a better thing to check
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Dec 2003 08:35:48 +0000 (08:35 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Dec 2003 08:35:48 +0000 (08:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3693 d7cf8633-e32d-0410-b094-e92efae38249

vid.h
vid_glx.c
vid_shared.c
vid_wgl.c

diff --git a/vid.h b/vid.h
index df2061145f4bbdf2bcb2b61f6965839cd4425414..a8086e6a000ff04dd68cb46ee17dfaf0399cd06f 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -43,7 +43,6 @@ extern void (*vid_menukeyfn)(int key);
 
 extern int vid_hidden;
 extern int vid_activewindow;
-extern int vid_allowhwgamma;
 extern cvar_t vid_hardwaregammasupported;
 extern int vid_usinghwgamma;
 
index 37b6d5aa24f7fdcb2baf4fc6654f0f58571f4d1b..4135f726b00bbe224a40e6edcb4c5c0edf7b1306 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -468,24 +468,20 @@ static void HandleEvents(void)
                        // window restored
                        vid_hidden = false;
                        vid_activewindow = false;
-                       vid_allowhwgamma = false;
                        VID_RestoreSystemGamma();
                        break;
                case UnmapNotify:
                        // window iconified/rolledup/whatever
                        vid_hidden = true;
                        vid_activewindow = false;
-                       vid_allowhwgamma = false;
                        VID_RestoreSystemGamma();
                        break;
                case FocusIn:
                        // window is now the input focus
-                       vid_allowhwgamma = true;
                        vid_activewindow = true;
                        break;
                case FocusOut:
                        // window is no longer the input focus
-                       vid_allowhwgamma = false;
                        vid_activewindow = false;
                        VID_RestoreSystemGamma();
                        break;
@@ -835,7 +831,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp)
 
        usingmouse = false;
        vid_hidden = false;
-       vid_allowhwgamma = true;
+       vid_activewindow = true;
        GL_Init();
        return true;
 }
index 7589a181153efabea9eea452d302d7070d716459..4da77ee4efad5f645266e92a7efa418853da8b9c 100644 (file)
@@ -46,8 +46,6 @@ int vid_hidden = true;
 // LordHavoc: if window is not the active window, don't hog as much CPU time,
 // let go of the mouse, turn off sound, and restore system gamma ramps...
 int vid_activewindow = true;
-// LordHavoc: whether to allow use of hwgamma (disabled when window is inactive)
-int vid_allowhwgamma = false;
 
 // we don't know until we try it!
 cvar_t vid_hardwaregammasupported = {CVAR_READONLY,"vid_hardwaregammasupported","1"};
@@ -605,7 +603,7 @@ void VID_UpdateGamma(qboolean force)
                return;
 
        if (!force
-        && vid_usinghwgamma == (vid_allowhwgamma && v_hwgamma.integer)
+        && vid_usinghwgamma == (vid_activewindow && v_hwgamma.integer)
         && v_gamma.value == cachegamma
         && v_contrast.value == cachecontrast
         && v_brightness.value == cachebrightness
@@ -621,7 +619,7 @@ void VID_UpdateGamma(qboolean force)
         && cachewhite[2] == v_color_white_b.value)
                return;
 
-       if (vid_allowhwgamma && v_hwgamma.integer)
+       if (vid_activewindow && v_hwgamma.integer)
        {
                if (!vid_usinghwgamma)
                {
index 64fed0390f8981f6ac34dc5d586e9a54f3a9a619..049258ecdebc4e20d9f36464a3e2f1050c21108b 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -468,7 +468,6 @@ void AppActivate(BOOL fActive, BOOL minimize)
 
        if (fActive)
        {
-               vid_allowhwgamma = true;
                if (vid_isfullscreen)
                {
                        if (vid_wassuspended)
@@ -485,7 +484,6 @@ void AppActivate(BOOL fActive, BOOL minimize)
 
        if (!fActive)
        {
-               vid_allowhwgamma = false;
                vid_usingmouse = false;
                IN_DeactivateMouse ();
                IN_ShowMouse ();