From b14b01d5c913b7e04a80173bfa375f1a648904b2 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 6 Apr 2025 10:59:59 +0200 Subject: [PATCH] somehow this is slightly faster --- src/hardware/hw_cache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index e67428920..7634906e2 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -998,11 +998,11 @@ void HWR_GetMappedPatch(GLPatch_t *glPatch, const UINT8 *colormap) { glMipmap = glMipmap->nextcolormap; - if (glMipmap->colormap != colormap) - continue; - - HWR_LoadMappedPatch(glMipmap, glPatch); - return; + if (glMipmap->colormap == colormap) + { + HWR_LoadMappedPatch(glMipmap, glPatch); + return; + } } // not found, create it! // If we are here, the sprite with the current colormap is not already in hardware memory