From 19ffd3a2dac0c1381481120ddb83d1aa633be9fe Mon Sep 17 00:00:00 2001 From: fsfksjfjse <145445903+fsfksjfjse@users.noreply.github.com> Date: Tue, 3 Nov 2026 03:55:25 +0800 Subject: [PATCH] Add mod folder names to the font atlas too A mod's folder name is drawn on the Mods tab (opt_text_row, menu.cpp) and as the Cheats tab's group heading (cheats_tab.cpp), and it comes from disk at runtime like a cheat name, so its glyphs were never in the atlas either. Both sources are added in the same place in fonts_up(), so one pass covers the whole menu. --- runtime/ui/menu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/ui/menu.cpp b/runtime/ui/menu.cpp index 35b65311..d2a3ac39 100644 --- a/runtime/ui/menu.cpp +++ b/runtime/ui/menu.cpp @@ -346,10 +346,12 @@ static int fonts_up(float scale) { ImFontGlyphRangesBuilder b; b.AddText(ui_text_in("en", kCjk[i].name)); ui_text_visit(kCjk[i].lang, add_row_glyphs, &b); - // Cheat names come from a mod's cheats/.txt at runtime, so no catalog row holds them - // and their glyphs would otherwise fall back to the missing-glyph box. + // Text the menu shows that no catalog row holds: a mod's cheat names and its folder name, + // both read from disk at runtime. Their glyphs would otherwise fall back to the missing-glyph box. for (int k = 0; k < cheats_count(); k++) if (const CheatInfo *ci = cheats_info(k); ci && ci->name) b.AddText(ci->name); + for (int k = 0; k < mods_count(); k++) + if (const ModInfo *mi = mods_at(k); mi) b.AddText(mi->name); b.BuildRanges(&ranges[i]); ImFontConfig mc; mc.MergeMode = true;