forked from len0rd/rockbox
Fixed crash with early USB. The USB screen already uses some of the new GUI code, so we have to init before. Fixed problem with gui_syncstatusbar_init() drawing the status bar(s) right away.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8030 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f839ccb36f
commit
bccfae0a58
4 changed files with 9 additions and 11 deletions
|
@ -95,13 +95,6 @@ void gui_statusbar_init(struct gui_statusbar * bar)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_statusbar_set_screen(struct gui_statusbar * bar,
|
|
||||||
struct screen * display)
|
|
||||||
{
|
|
||||||
bar->display = display;
|
|
||||||
gui_statusbar_draw(bar, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
|
void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
|
||||||
{
|
{
|
||||||
struct screen * display = bar->display;
|
struct screen * display = bar->display;
|
||||||
|
|
|
@ -85,7 +85,8 @@ extern void gui_statusbar_init(struct gui_statusbar * bar);
|
||||||
* - bar : the statusbar structure
|
* - bar : the statusbar structure
|
||||||
* - display : the screen to attach
|
* - display : the screen to attach
|
||||||
*/
|
*/
|
||||||
extern void gui_statusbar_set_screen(struct gui_statusbar * bar, struct screen * display);
|
#define gui_statusbar_set_screen(gui_statusbar, screen) \
|
||||||
|
(gui_statusbar)->display = screen
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Draws the status bar on the attached screen
|
* Draws the status bar on the attached screen
|
||||||
|
|
|
@ -148,6 +148,9 @@ void init(void)
|
||||||
font_init();
|
font_init();
|
||||||
show_logo();
|
show_logo();
|
||||||
lang_init();
|
lang_init();
|
||||||
|
/* Must be done before any code uses the multi-screen APi */
|
||||||
|
screen_access_init();
|
||||||
|
gui_syncstatusbar_init(&statusbars);
|
||||||
settings_reset();
|
settings_reset();
|
||||||
settings_calc_config_sector();
|
settings_calc_config_sector();
|
||||||
settings_load(SETTINGS_ALL);
|
settings_load(SETTINGS_ALL);
|
||||||
|
@ -245,6 +248,10 @@ void init(void)
|
||||||
radio_init();
|
radio_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Must be done before any code uses the multi-screen APi */
|
||||||
|
screen_access_init();
|
||||||
|
gui_syncstatusbar_init(&statusbars);
|
||||||
|
|
||||||
#if defined(HAVE_CHARGING) && (CONFIG_CPU == SH7034)
|
#if defined(HAVE_CHARGING) && (CONFIG_CPU == SH7034)
|
||||||
if (coldstart && charger_inserted()
|
if (coldstart && charger_inserted()
|
||||||
&& !global_settings.car_adapter_mode
|
&& !global_settings.car_adapter_mode
|
||||||
|
|
|
@ -213,8 +213,6 @@ bool check_rockboxdir(void)
|
||||||
|
|
||||||
void browse_root(void)
|
void browse_root(void)
|
||||||
{
|
{
|
||||||
/* essential to all programs that wants to display things */
|
|
||||||
screen_access_init();
|
|
||||||
gui_sync_wps_screen_init();
|
gui_sync_wps_screen_init();
|
||||||
|
|
||||||
filetype_init();
|
filetype_init();
|
||||||
|
@ -232,7 +230,6 @@ void browse_root(void)
|
||||||
/* since archos only have one screen, no need to create more than that */
|
/* since archos only have one screen, no need to create more than that */
|
||||||
gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) );
|
gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) );
|
||||||
#endif
|
#endif
|
||||||
gui_syncstatusbar_init(&statusbars);
|
|
||||||
gui_synclist_init(&tree_lists, &tree_get_filename, &tc);
|
gui_synclist_init(&tree_lists, &tree_get_filename, &tc);
|
||||||
gui_synclist_set_icon_callback(&tree_lists,
|
gui_synclist_set_icon_callback(&tree_lists,
|
||||||
global_settings.show_icons?&tree_get_fileicon:NULL);
|
global_settings.show_icons?&tree_get_fileicon:NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue