extern int vid_hidden;
extern int vid_activewindow;
-extern int vid_allowhwgamma;
extern cvar_t vid_hardwaregammasupported;
extern int vid_usinghwgamma;
// 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;
usingmouse = false;
vid_hidden = false;
- vid_allowhwgamma = true;
+ vid_activewindow = true;
GL_Init();
return 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"};
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
&& cachewhite[2] == v_color_white_b.value)
return;
- if (vid_allowhwgamma && v_hwgamma.integer)
+ if (vid_activewindow && v_hwgamma.integer)
{
if (!vid_usinghwgamma)
{
if (fActive)
{
- vid_allowhwgamma = true;
if (vid_isfullscreen)
{
if (vid_wassuspended)
if (!fActive)
{
- vid_allowhwgamma = false;
vid_usingmouse = false;
IN_DeactivateMouse ();
IN_ShowMouse ();