summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/statusbar.c7
-rw-r--r--apps/gui/statusbar.h3
-rw-r--r--apps/main.c7
-rw-r--r--apps/tree.c3
4 files changed, 9 insertions, 11 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 70fe77facd..eec031fa93 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -95,13 +95,6 @@ void gui_statusbar_init(struct gui_statusbar * bar)
#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)
{
struct screen * display = bar->display;
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h
index 77ceefd69f..e7fe92eaf9 100644
--- a/apps/gui/statusbar.h
+++ b/apps/gui/statusbar.h
@@ -85,7 +85,8 @@ extern void gui_statusbar_init(struct gui_statusbar * bar);
* - bar : the statusbar structure
* - 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
diff --git a/apps/main.c b/apps/main.c
index 4f23dfaba4..9afb3e9a13 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -148,6 +148,9 @@ void init(void)
font_init();
show_logo();
lang_init();
+ /* Must be done before any code uses the multi-screen APi */
+ screen_access_init();
+ gui_syncstatusbar_init(&statusbars);
settings_reset();
settings_calc_config_sector();
settings_load(SETTINGS_ALL);
@@ -245,6 +248,10 @@ void init(void)
radio_init();
#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 (coldstart && charger_inserted()
&& !global_settings.car_adapter_mode
diff --git a/apps/tree.c b/apps/tree.c
index f484463d2d..bed4fb28fc 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -213,8 +213,6 @@ bool check_rockboxdir(void)
void browse_root(void)
{
- /* essential to all programs that wants to display things */
- screen_access_init();
gui_sync_wps_screen_init();
filetype_init();
@@ -232,7 +230,6 @@ void browse_root(void)
/* since archos only have one screen, no need to create more than that */
gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) );
#endif
- gui_syncstatusbar_init(&statusbars);
gui_synclist_init(&tree_lists, &tree_get_filename, &tc);
gui_synclist_set_icon_callback(&tree_lists,
global_settings.show_icons?&tree_get_fileicon:NULL);