From ad87f7f895e2cc8167e0baf2cea6b4a53870c767 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 11 Jan 2024 00:51:19 +0100 Subject: [PATCH 1/2] dont initialize this to 1 oopsie --- src/sdl/ogl_sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 9cc2d1a94..dc831fce0 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -238,7 +238,7 @@ void OglSdlFinishUpdate(boolean waitvbl) EXPORT void HWRAPI(OglSdlSetPalette) (RGBA_t *palette) { - INT32 i = 1; + INT32 i; for (i = 0; i < 256; i++) { From cdef315866def995d1bb1279f2c6a3328f26a68f Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 11 Jan 2024 01:09:51 +0100 Subject: [PATCH 2/2] 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 }