From 22adf477a4c85eaaef074d0e54c2c641e1c9386a Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Sat, 11 Apr 2026 21:46:14 +0200 Subject: [PATCH] Fix JUTResFont duplicating texture data I misunderstood the way this code works the first time. --- libs/JSystem/src/JUtility/JUTResFont.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/JSystem/src/JUtility/JUTResFont.cpp b/libs/JSystem/src/JUtility/JUTResFont.cpp index 10443d6404..206968f053 100644 --- a/libs/JSystem/src/JUtility/JUTResFont.cpp +++ b/libs/JSystem/src/JUtility/JUTResFont.cpp @@ -435,10 +435,10 @@ void JUTResFont::loadImage(int code, GXTexMapID id){ mHeight = cellRow * cellH; #if TARGET_PC - const auto found = mGlyphTextures->textures.find(code); + const auto found = mGlyphTextures->textures.find(pageIdx); GXTexObj* texObj; if (found == mGlyphTextures->textures.end()) { - texObj = &mGlyphTextures->textures[code]; + texObj = &mGlyphTextures->textures[pageIdx]; void* pImg = &mpGlyphBlocks[i]->data[pageIdx * mpGlyphBlocks[i]->textureSize]; GXInitTexObj(texObj, pImg, mpGlyphBlocks[i]->textureWidth, mpGlyphBlocks[i]->textureHeight, (GXTexFmt)(u16)mpGlyphBlocks[i]->textureFormat,