From cdef315866def995d1bb1279f2c6a3328f26a68f Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 11 Jan 2024 01:09:51 +0100 Subject: [PATCH] fix software more crash --- src/hardware/hw_cache.c | 1 + src/r_data.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 2aeb497bb..18a2d20fe 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -1099,6 +1099,7 @@ UINT32 HWR_GetLightTableID(extracolormap_t *colormap) void HWR_ClearLightTables(void) { //if (vid.glstate == VID_GL_LIBRARY_LOADED) + if (rendermode == render_opengl) HWD.pfnClearLightTables(); } diff --git a/src/r_data.c b/src/r_data.c index 23629af03..7c6697298 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -28,7 +28,6 @@ #ifdef HWRENDER #include "hardware/hw_main.h" - #include "hardware/hw_glob.h" // HWR_ClearLightTables #endif @@ -1141,7 +1140,8 @@ void R_ClearColormaps(void) memset(extra_colormaps, 0, sizeof (extra_colormaps)); #ifdef HWRENDER - HWR_ClearLightTables(); + if (rendermode == render_opengl) + HWR_ClearLightTables(); #endif }