From 81c65536ec553dea5ae873d1fca3584b7545ad62 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 2 Mar 2025 14:41:06 -0500 Subject: [PATCH] [Bugfix] #FS13567 5+ fonts WPS file causes next theme loaded to fail Investigating this issue I found that when SBS and WPS share the same fonts the refcount prevents the soon to be unused font from unloading by the time the fnt is unloaded its already too late because the WPS load failed. What appears to work is freeing the fonts used by the skin items ahead of time via skin_reset_buffers() in a separate loop instead of in the loop used to load the skin files Change-Id: Ib118163185d48b67b7c96e436bfb6fab8db546a9 --- apps/gui/skin_engine/skin_engine.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index 6b190ad725..f54d1bc751 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c @@ -179,6 +179,16 @@ void settings_apply_skins(void) audio_stop(); bool first_run = skin_backdrop_init(); + + if (!first_run) + { + /* Make sure all skins unloaded */ + for (i=0; iload_on_boot)