mark stuff for blitting loop as const and with register

gives another 5-7fps or so for me
This commit is contained in:
Alug committed 2025-08-17 18:19:20 +02:00
1 parent 8d1ef1721f
commit 4fcb41f659
1 file changed
+4 -4
+4 -4
View File
@@ -1477,12 +1477,12 @@ void I_FinishUpdate(void)
if (rendermode == render_soft && vid.screens[0])
{
SDL_LockSurface(vidSurface);
// copy pixels ourselves to the video surface (prevents a crash in libsdl)
UINT32 *dst = vidSurface->pixels;
UINT8 *src = vid.screens[0];
for (int32_t i = 0; i < vid.width * vid.height; i++)
UINT32 *restrict dst = vidSurface->pixels;
const UINT8 *restrict src = vid.screens[0];
const INT32 count = vid.width * vid.height;
for (INT32 i = 0; i < count; i++)
*dst++ = localPalette[*src++];
SDL_UnlockSurface(vidSurface);
// Fury -- there's no way around UpdateTexture, the GL backend uses it anyway