------------------------------------------------------------------------
r4241 | acceptthis | 2013-03-08 02:42:39 +0000 (Fri, 08 Mar 2013) | 1 line Delay gamma changes, to avoid issues with ATI. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4237 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
15425420ca
commit
3ef2925cd8
2 changed files with 16 additions and 2 deletions
|
@ -51,6 +51,7 @@ qboolean isDedicated = false;
|
||||||
#endif
|
#endif
|
||||||
extern qboolean isPlugin;
|
extern qboolean isPlugin;
|
||||||
qboolean debugout;
|
qboolean debugout;
|
||||||
|
float gammapending; //to cope with ATI. When it times out, v_gamma is reforced in order to correct/update gamma now the drivers think that they have won.
|
||||||
|
|
||||||
HWND sys_parentwindow;
|
HWND sys_parentwindow;
|
||||||
unsigned int sys_parentleft; //valid if sys_parentwindow is set
|
unsigned int sys_parentleft; //valid if sys_parentwindow is set
|
||||||
|
@ -1506,6 +1507,16 @@ void Sys_SendKeyEvents (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gammapending)
|
||||||
|
{
|
||||||
|
gammapending -= host_frametime;
|
||||||
|
if (gammapending < host_frametime)
|
||||||
|
{
|
||||||
|
gammapending = 0;
|
||||||
|
Cvar_ForceCallback(&v_gamma);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
|
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
// we always update if there are any event, even if we're paused
|
// we always update if there are any event, even if we're paused
|
||||||
|
|
|
@ -143,6 +143,8 @@ viddef_t vid; // global video state
|
||||||
|
|
||||||
modestate_t modestate = MS_UNINIT;
|
modestate_t modestate = MS_UNINIT;
|
||||||
|
|
||||||
|
extern float gammapending;
|
||||||
|
|
||||||
|
|
||||||
LONG WINAPI GLMainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
LONG WINAPI GLMainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
qboolean GLAppActivate(BOOL fActive, BOOL minimize);
|
qboolean GLAppActivate(BOOL fActive, BOOL minimize);
|
||||||
|
@ -1821,7 +1823,8 @@ qboolean GLAppActivate(BOOL fActive, BOOL minimize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cvar_ForceCallback(&v_gamma);
|
gammapending = 0.5; //delayed gamma force
|
||||||
|
Cvar_ForceCallback(&v_gamma); //so the delay isn't so blatent when you have decent graphics drivers that don't break things.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fActive)
|
if (!fActive)
|
||||||
|
@ -1834,7 +1837,7 @@ qboolean GLAppActivate(BOOL fActive, BOOL minimize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cvar_ForceCallback(&v_gamma); //wham bam thanks.
|
// Cvar_ForceCallback(&v_gamma); //wham bam thanks.
|
||||||
|
|
||||||
if (qSetDeviceGammaRamp)
|
if (qSetDeviceGammaRamp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue