mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
------------------------------------------------------------------------
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
|
||||
extern qboolean isPlugin;
|
||||
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;
|
||||
unsigned int sys_parentleft; //valid if sys_parentwindow is set
|
||||
|
@ -1506,6 +1507,16 @@ void Sys_SendKeyEvents (void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (gammapending)
|
||||
{
|
||||
gammapending -= host_frametime;
|
||||
if (gammapending < host_frametime)
|
||||
{
|
||||
gammapending = 0;
|
||||
Cvar_ForceCallback(&v_gamma);
|
||||
}
|
||||
}
|
||||
|
||||
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
// 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;
|
||||
|
||||
extern float gammapending;
|
||||
|
||||
|
||||
LONG WINAPI GLMainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue