Glyph cache refreshes lifetimes

This commit is contained in:
Garhoogin 2025-05-03 16:39:56 -05:00 committed by GitHub
parent 8366bdea21
commit a047b6c0e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,7 +171,12 @@ static int NftrViewerCacheGetByCP(NFTRVIEWERDATA *data, uint16_t cp) {
NftrViewerCacheEntry *ent = StListGetPtr(&data->glyphCache, i);
if (ent->cp == cp) {
//found
return ent->image;
int iImage = ent->image;
NftrViewerCacheEntry cpy;
StListGet(&data->glyphCache, i, &cpy);
StListRemove(&data->glyphCache, i);
StListAdd(&data->glyphCache, &cpy);
return iImage;
}
}