diff --git a/patch_v2/meow_launcherd/font_theme.c b/patch_v2/meow_launcherd/font_theme.c index 0988dca..525819a 100644 --- a/patch_v2/meow_launcherd/font_theme.c +++ b/patch_v2/meow_launcherd/font_theme.c @@ -717,7 +717,14 @@ void meow_font_scan_presets_root(const char *card_root) } /* M2.58:扫描结果落盘为 /MeowOS/config/fonts/index(含默认行 index0), * 作为 SDK meow_font_get_available_count()/enumerate() 的持久数据源;无卡时仅默认 1 行, - * 由 meow_font_write_index 内部 mkdir-fail 静默放弃(此路径不刷屏)。 */ + * 由 meow_font_write_index 内部 mkdir-fail 静默放弃(此路径不刷屏)。 + * M2.82+ 修补:挂载点目录在无卡时也存在(mkdir 骗过 ENOENT 检查)→ 开机早扫曾把 + * 卡上 18 条 index 覆盖成 1 条默认。故:fonts 根目录根本没打开(opendir 失败)且 + * 只剩默认项时,判定为「卡在但字库目录不可读/未就绪」→ 不写 index,保留旧索引。 */ + if (!d && font_presets_n <= 1) { + logmsg("fonts: scan root unavailable, keep existing index (%d presets in mem)", font_presets_n); + return; + } meow_font_write_index(card_root); } diff --git a/patch_v2/meow_launcherd/main_menu.c b/patch_v2/meow_launcherd/main_menu.c index d64825c..43b6ac3 100644 --- a/patch_v2/meow_launcherd/main_menu.c +++ b/patch_v2/meow_launcherd/main_menu.c @@ -898,6 +898,7 @@ static void run_menu(struct app apps[MAX_APPS], int napps, int state, int was_nocard = (state == 1); if (!mfont_ready && meow_font_ensure()) { dirty = 1; logmsg("hotplug: font loaded late"); } if (mfont_ready) meow_font_reload_multifont(); /* M2.5x:卡挂载后重配多字体(此前无全局可配) */ + meow_font_scan_presets(); /* M2.82+:卡就绪后重扫字库(启动时卡未挂载会只有默认项) */ if (was_nocard || state != 0 || napps == 0) { struct app fresh[MAX_APPS]; int fn = scan_apps(fresh); diff --git a/patch_v2/meow_launcherd/meow_launcherd b/patch_v2/meow_launcherd/meow_launcherd index e328ca8..521aa37 100755 Binary files a/patch_v2/meow_launcherd/meow_launcherd and b/patch_v2/meow_launcherd/meow_launcherd differ