fix FS#12295

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30614 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2011-09-28 01:02:48 +00:00
parent a1d3a1d143
commit 4f7a73aad8
4 changed files with 15 additions and 3 deletions

View file

@ -129,7 +129,7 @@ void gui_sync_skin_init(void)
}
}
void settings_apply_skins(void)
void skin_unload_all(void)
{
int i, j;
@ -140,12 +140,17 @@ void settings_apply_skins(void)
}
skin_buffer_init(skin_buffer, skin_buffer_size);
#ifdef HAVE_LCD_BITMAP
skin_backdrop_init();
#endif
gui_sync_skin_init();
}
void settings_apply_skins(void)
{
int i, j;
skin_unload_all();
/* Make sure each skin is loaded */
for (i=0; i<SKINNABLE_SCREENS_COUNT; i++)
{

View file

@ -100,6 +100,7 @@ struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type scre
struct wps_state *skin_get_global_state(void);
void gui_sync_skin_init(void);
void skin_unload_all(void);
bool skin_do_full_update(enum skinnable_screens skin, enum screen_type screen);
void skin_request_full_update(enum skinnable_screens skin);

View file

@ -1452,11 +1452,13 @@ void skin_data_free_buflib_allocs(struct wps_data *wps_data)
core_free(img->buflib_handle);
list = list->next;
}
wps_data->images = NULL;
if (wps_data->font_ids != NULL)
{
while (wps_data->font_count > 0)
font_unload(wps_data->font_ids[--wps_data->font_count]);
}
wps_data->font_ids = NULL;
#endif
#endif
}

View file

@ -38,6 +38,7 @@
#include "led.h"
#include "appevents.h"
#include "usb_screen.h"
#include "skin_engine/skin_engine.h"
#ifdef HAVE_LCD_BITMAP
#include "bitmaps/usblogo.h"
@ -265,8 +266,11 @@ void gui_usb_screen_run(bool early_usb)
/* The font system leaves the .fnt fd's open, so we need for force close them all */
#ifdef HAVE_LCD_BITMAP
FOR_NB_SCREENS(i)
{
font_unload(global_status.font_id[i]);
// FIXME skin_font_init(); /* unload all the skin fonts */
global_status.font_id[i] = -1;
}
skin_unload_all();
#endif
}