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

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