From: cloudwalk Date: Sat, 16 May 2020 20:12:43 +0000 (+0000) Subject: Make use of CACHEPICFLAG_FAILONMISSING flag for conback if missing content X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ec51413567a78f109ecee254e6973a42c8a026c;p=xonotic%2Fdarkplaces.git Make use of CACHEPICFLAG_FAILONMISSING flag for conback if missing content This makes the console readable if game content is missing, by rendering solid black, just like before. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12529 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/console.c b/console.c index a2f850c0..5f14b83f 100644 --- a/console.c +++ b/console.c @@ -1956,6 +1956,7 @@ void Con_DrawConsole (int lines) int mask_must = 0; int mask_mustnot = (developer.integer>0) ? 0 : CON_MASK_DEVELOPER; cachepic_t *conbackpic; + unsigned int conbackflags; if (lines <= 0) return; @@ -1975,7 +1976,10 @@ void Con_DrawConsole (int lines) { sx = scr_conscroll_x.value; sy = scr_conscroll_y.value; - conbackpic = scr_conbrightness.value >= 0.01f ? Draw_CachePic_Flags("gfx/conback", (sx != 0 || sy != 0) ? CACHEPICFLAG_NOCLAMP : 0) : NULL; + conbackflags = CACHEPICFLAG_FAILONMISSING; // So console is readable when game content is missing + if (sx != 0 || sy != 0) + conbackflags &= CACHEPICFLAG_NOCLAMP; + conbackpic = scr_conbrightness.value >= 0.01f ? Draw_CachePic_Flags("gfx/conback", conbackflags) : NULL; sx *= realtime; sy *= realtime; sx -= floor(sx); sy -= floor(sy); if (Draw_IsPicLoaded(conbackpic))