some form of a workaround for recursive calling of TexMgr_Anisotropy_f()

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@614 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2012-01-19 20:22:29 +00:00
parent dec3161565
commit da6fde8df6

View file

@ -183,14 +183,22 @@ FIXME: this is getting called twice (becuase of the recursive Cvar_SetValue call
===============
*/
static void TexMgr_Anisotropy_f (cvar_t *var)
{
if (gl_texture_anisotropy.value < 1)
{
Cvar_SetQuick (&gl_texture_anisotropy, "1");
}
else if (gl_texture_anisotropy.value > gl_max_anisotropy)
{
Cvar_SetValueQuick (&gl_texture_anisotropy, gl_max_anisotropy);
}
else
{
gltexture_t *glt;
Cvar_SetValue ("gl_texture_anisotropy", CLAMP (1.0f, gl_texture_anisotropy.value, gl_max_anisotropy));
for (glt = active_gltextures; glt; glt = glt->next)
TexMgr_SetFilterModes (glt);
}
}
/*
===============