From 0ec51413567a78f109ecee254e6973a42c8a026c Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sat, 16 May 2020 20:12:43 +0000 Subject: [PATCH] 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 --- console.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) -- 2.39.2