diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-07-05 18:07:58 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-07-05 18:07:58 +0000 |
commit | f1034e00f6196c810466da66a9a24bf2e5f61272 (patch) | |
tree | 2e49089d421a75030c3a8e30503907a7f20eb511 /apps/gui/statusbar.c | |
parent | 802743a061e01150db544c8e072cd794731b18a7 (diff) | |
download | rockbox-f1034e00f6196c810466da66a9a24bf2e5f61272.tar.gz rockbox-f1034e00f6196c810466da66a9a24bf2e5f61272.zip |
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
Diffstat (limited to 'apps/gui/statusbar.c')
-rw-r--r-- | apps/gui/statusbar.c | 14 |
1 files changed, 12 insertions, 2 deletions
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); |