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) | |||
263 | memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info))) | 263 | memcmp(&(bar->info), &(bar->lastinfo), sizeof(struct status_info))) |
264 | { | 264 | { |
265 | struct viewport vp; | 265 | struct viewport vp; |
266 | bool bar_at_top = true; | ||
266 | viewport_set_defaults(&vp, display->screen_type); | 267 | viewport_set_defaults(&vp, display->screen_type); |
267 | vp.height = STATUSBAR_HEIGHT; | 268 | vp.height = STATUSBAR_HEIGHT; |
268 | vp.x = STATUSBAR_X_POS; | 269 | vp.x = STATUSBAR_X_POS; |
269 | vp.y = STATUSBAR_Y_POS; | 270 | #ifdef HAVE_REMOTE_LCD |
271 | if (display->screen_type == SCREEN_REMOTE) | ||
272 | bar_at_top = global_settings.remote_statusbar != STATUSBAR_BOTTOM; | ||
273 | else | ||
274 | #endif | ||
275 | bar_at_top = global_settings.statusbar != STATUSBAR_BOTTOM; | ||
276 | if (bar_at_top) | ||
277 | vp.y = 0; | ||
278 | else | ||
279 | vp.y = display->lcdheight - STATUSBAR_HEIGHT; | ||
270 | display->set_viewport(&vp); | 280 | display->set_viewport(&vp); |
271 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 281 | display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
272 | display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT); | 282 | display->fillrect(0, 0, display->getwidth(), STATUSBAR_HEIGHT); |
@@ -814,7 +824,7 @@ void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, | |||
814 | } | 824 | } |
815 | } | 825 | } |
816 | 826 | ||
817 | void gui_statusbar_changed(bool enabled) | 827 | void gui_statusbar_changed(int enabled) |
818 | { | 828 | { |
819 | (void)enabled; | 829 | (void)enabled; |
820 | send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); | 830 | send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); |