speed up GL_SetPalette "take 2"

ensuring bytecolor is packed nd mypalettedata is initialized this seems to now work properly on windows
This commit is contained in:
Alug committed 2025-11-12 19:20:43 +01:00
1 parent b779c9e63d
commit aa985823ba
1 file changed
+5 -5
+5 -5
View File
@@ -1499,14 +1499,14 @@ void GL_ReadScreenTexture(int tex, UINT8 *restrict dest, INT32 scale)
// -----------------+
void GL_SetPalette(RGBA_t *palette)
{
INT32 i;
const size_t palsize = (sizeof(RGBA_t) * 256);
for (i = 0; i < 256; i++)
// on a palette change, you have to reload all of the textures
if (memcmp(myPaletteData, palette, palsize))
{
myPaletteData[i].s = palette[i].s;
memcpy(myPaletteData, palette, palsize);
GL_Flush();
}
GL_Flush();
}
// -----------------+