summaryrefslogtreecommitdiff
path: root/apps/gui/usb_screen.c
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-10-10 13:17:39 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-10-10 13:17:39 +0000
commitc8c40c52916ec5af08c4ec76059b632366c0fa5f (patch)
tree8ddb8b862add93e7273aedcf71d32ffc81d225cf /apps/gui/usb_screen.c
parent0d100b4dd83a780af9bd3e3b0384e4a40e517ff4 (diff)
downloadrockbox-c8c40c52916ec5af08c4ec76059b632366c0fa5f.zip
rockbox-c8c40c52916ec5af08c4ec76059b632366c0fa5f.tar.gz
rockbox-c8c40c52916ec5af08c4ec76059b632366c0fa5f.tar.bz2
rockbox-c8c40c52916ec5af08c4ec76059b632366c0fa5f.tar.xz
Add a "early_usb" argument to gui_usb_screen_run(), and don't do skin unloading/reloading in gui_usb_screen_run() in the early usb case. Fixes the crash part of FS#11589
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28229 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/usb_screen.c')
-rw-r--r--apps/gui/usb_screen.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index 00e128b..78f61f5 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -241,7 +241,7 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
}
}
-void gui_usb_screen_run(void)
+void gui_usb_screen_run(bool early_usb)
{
int i;
struct usb_screen_vps_t usb_screen_vps_ar[NB_SCREENS];
@@ -262,14 +262,18 @@ void gui_usb_screen_run(void)
usb_keypad_mode = global_settings.usb_keypad_mode;
#endif
- /* The font system leaves the .fnt fd's open, so we need for force close them all */
+ if(!early_usb)
+ {
+ /* The font system leaves the .fnt fd's open, so we need for force close them all */
#ifdef HAVE_LCD_BITMAP
- font_reset(NULL);
+ font_reset(NULL);
#ifdef HAVE_REMOTE_LCD
- font_load_remoteui(NULL);
+ font_load_remoteui(NULL);
#endif
- skin_font_init(); /* unload all the skin fonts */
+ skin_font_init(); /* unload all the skin fonts */
#endif
+ }
+
FOR_NB_SCREENS(i)
{
struct screen *screen = &screens[i];
@@ -324,9 +328,12 @@ void gui_usb_screen_run(void)
status_set_usb(false);
#endif /* HAVE_LCD_CHARCELLS */
#ifdef HAVE_LCD_BITMAP
- /* Not pretty, reload all settings so fonts are loaded again correctly */
- settings_apply(true);
- settings_apply_skins();
+ if(!early_usb)
+ {
+ /* Not pretty, reload all settings so fonts are loaded again correctly */
+ settings_apply(true);
+ settings_apply_skins();
+ }
#endif
FOR_NB_SCREENS(i)