From bccfae0a58515e489c3aa7f412154db56ae205d6 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 21 Nov 2005 18:39:18 +0000 Subject: 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 --- apps/gui/statusbar.c | 7 ------- apps/gui/statusbar.h | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 70fe77f..eec031f 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 77ceefd..e7fe92e 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 -- cgit v1.1