From: Rudolf Polzer Date: Sat, 12 Oct 2013 17:17:00 +0000 (+0200) Subject: r_restart on conwidth/conheight change to reload fonts at the proper sizes X-Git-Tag: xonotic-v0.8.0~292 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=8f0636396db739b4a036ca92fdd5f38ea86379aa;p=xonotic%2Fxonotic-data.pk3dir.git r_restart on conwidth/conheight change to reload fonts at the proper sizes --- diff --git a/qcsrc/menu/xonotic/slider_resolution.c b/qcsrc/menu/xonotic/slider_resolution.c index 0c33e3455..a7cf04bf7 100644 --- a/qcsrc/menu/xonotic/slider_resolution.c +++ b/qcsrc/menu/xonotic/slider_resolution.c @@ -61,8 +61,16 @@ void updateConwidths(float width, float height, float pixelheight) f = 1; c = c * f; // fteqcc fail - cvar_set("vid_conwidth", ftos(rint(c_x))); - cvar_set("vid_conheight", ftos(rint(c_y))); + c_x = rint(c_x); + c_y = rint(c_y); + + if (c_x != cvar("vid_conwidth") || c_y != cvar("vid_conheight")) + { + cvar_set("vid_conwidth", ftos(c_x)); + cvar_set("vid_conheight", ftos(c_y)); + localcmd("\nr_restart\n"); + } + XonoticResolutionSlider_DataHasChanged = TRUE; } entity makeXonoticResolutionSlider()