From dbf744845d4aa40fa6c039c9f84fbba92d94b740 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Fri, 12 Mar 2021 18:52:58 +0200 Subject: [PATCH] Fix unnecessary texture reloads on respawn in opengl by removing unneeded V_SetPalette calls --- src/st_stuff.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 9d726998..33394a81 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -232,7 +232,7 @@ void ST_doPaletteStuff(void) { st_palette = palette; - if (rendermode != render_none) + if (rendermode == render_soft) { //V_SetPaletteLump(GetPalette()); // Reset the palette -- is this needed? if (!splitscreen) @@ -392,7 +392,10 @@ static inline void ST_Stop(void) if (st_stopped) return; - V_SetPalette(0); +#ifdef HWRENDER + if (rendermode != render_opengl) +#endif + V_SetPalette(0); st_stopped = true; }