From f1034e00f6196c810466da66a9a24bf2e5f61272 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 5 Jul 2009 18:07:58 +0000 Subject: FS#10406 - split the statusbar setting into one for each display, and allow the bar to be at the top or bottom of the display git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21665 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/statusbar.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apps/gui/statusbar.c') diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index ec804ab41f..dca4169603 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -263,10 +263,20 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info))) { struct viewport vp; + bool bar_at_top = true; viewport_set_defaults(&vp, display->screen_type); vp.height = STATUSBAR_HEIGHT; vp.x = STATUSBAR_X_POS; - vp.y = STATUSBAR_Y_POS; +#ifdef HAVE_REMOTE_LCD + if (display->screen_type == SCREEN_REMOTE) + bar_at_top = global_settings.remote_statusbar != STATUSBAR_BOTTOM; + else +#endif + bar_at_top = global_settings.statusbar != STATUSBAR_BOTTOM; + if (bar_at_top) + vp.y = 0; + else + vp.y = display->lcdheight - STATUSBAR_HEIGHT; display->set_viewport(&vp); display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT); @@ -814,7 +824,7 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, } } -void gui_statusbar_changed(bool enabled) +void gui_statusbar_changed(int enabled) { (void)enabled; send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); -- cgit v1.2.3