gl_font should now update the menu cache conchars texture
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2224 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ba38acd1ce
commit
8709f8ec1f
1 changed files with 16 additions and 0 deletions
|
@ -2279,6 +2279,9 @@ void GL_Fontedgeclamp_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
|
|
||||||
void GL_Font_Callback(struct cvar_s *var, char *oldvalue)
|
void GL_Font_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
{
|
{
|
||||||
|
mpic_t *pic;
|
||||||
|
int old_char_texture = char_texture;
|
||||||
|
|
||||||
if (!*var->string
|
if (!*var->string
|
||||||
|| (!(char_texture=Mod_LoadHiResTexture(var->string, "fonts", false, true, true))
|
|| (!(char_texture=Mod_LoadHiResTexture(var->string, "fonts", false, true, true))
|
||||||
&& !(char_texture=Mod_LoadHiResTexture(var->string, "charsets", false, true, true))))
|
&& !(char_texture=Mod_LoadHiResTexture(var->string, "charsets", false, true, true))))
|
||||||
|
@ -2289,6 +2292,19 @@ void GL_Font_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
else
|
else
|
||||||
custom_char_instep = 0.5f/((image_width+image_height)/2);
|
custom_char_instep = 0.5f/((image_width+image_height)/2);
|
||||||
|
|
||||||
|
// update the conchars texture within the menu cache
|
||||||
|
if (old_char_texture != char_texture)
|
||||||
|
{
|
||||||
|
pic = GLDraw_IsCached("conchars");
|
||||||
|
if (pic)
|
||||||
|
{
|
||||||
|
glpic_t *gl = (glpic_t *)pic->data;
|
||||||
|
gl->texnum = char_texture;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Con_Printf(S_ERROR "ERROR: Unable to update conchars texture!");
|
||||||
|
}
|
||||||
|
|
||||||
GL_Smoothfont_Callback(&gl_smoothfont, "");
|
GL_Smoothfont_Callback(&gl_smoothfont, "");
|
||||||
GL_Fontedgeclamp_Callback(&gl_fontedgeclamp, "");
|
GL_Fontedgeclamp_Callback(&gl_fontedgeclamp, "");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue