From e2d10420a7f5a86d8a211b7c32043017fbaaf0a4 Mon Sep 17 00:00:00 2001 From: Bigfoot71 Date: Sun, 6 Jul 2025 17:46:00 +0200 Subject: [PATCH] fix var name... --- src/external/rlsw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/external/rlsw.h b/src/external/rlsw.h index 51f7c3ba0..dda44fc42 100644 --- a/src/external/rlsw.h +++ b/src/external/rlsw.h @@ -1312,10 +1312,10 @@ static inline void sw_framebuffer_fill(void* colorPtr, void* depthPtr, int size, // Calculate and pack 5:6:5 color // Scale color components to the max value for each bit depth and round uint16_t r16 = (uint16_t)(color[0] * 31.0f + 0.5f); - uint16_t r16 = (uint16_t)(color[1] * 63.0f + 0.5f); + uint16_t g16 = (uint16_t)(color[1] * 63.0f + 0.5f); uint16_t b16 = (uint16_t)(color[2] * 31.0f + 0.5f); // Pack the components into a 16-bit value - uint16_t packedColor = ((r16 & 0x1F) << 11) | ((r16 & 0x3F) << 5) | (b16 & 0x1F); + uint16_t packedColor = ((r16 & 0x1F) << 11) | ((g16 & 0x3F) << 5) | (b16 & 0x1F); uint16_t* cptr = (uint16_t*)colorPtr; #elif (SW_COLOR_BUFFER_BITS == 24) // Calculate 8:8:8 color components