Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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

+10 -5
+10 -5
apps/gui/skin_engine/skin_engine.c
··· 179 179 audio_stop(); 180 180 181 181 bool first_run = skin_backdrop_init(); 182 + 183 + if (!first_run) 184 + { 185 + /* Make sure all skins unloaded */ 186 + for (i=0; i<SKINNABLE_SCREENS_COUNT; i++) 187 + { 188 + FOR_NB_SCREENS(j) 189 + skin_reset_buffers(i, j); 190 + } 191 + } 182 192 skins_initialised = true; 183 193 184 194 /* Make sure each skin is loaded */ ··· 187 197 FOR_NB_SCREENS(j) 188 198 { 189 199 get_skin_filename(filename, MAX_PATH, i,j); 190 - 191 - if (!first_run) 192 - { 193 - skin_reset_buffers(i, j); 194 - } 195 200 gui_skin_reset(&skins[i][j]); 196 201 skins[i][j].gui_wps.display = &screens[j]; 197 202 if (skin_helpers[i]->load_on_boot)