diff options
Diffstat (limited to 'apps/gui/statusbar.c')
-rw-r--r-- | apps/gui/statusbar.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index dca4169603..47dcb4ead1 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -263,17 +263,10 @@ 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; | ||
267 | viewport_set_defaults(&vp, display->screen_type); | 266 | viewport_set_defaults(&vp, display->screen_type); |
268 | vp.height = STATUSBAR_HEIGHT; | 267 | vp.height = STATUSBAR_HEIGHT; |
269 | vp.x = STATUSBAR_X_POS; | 268 | vp.x = STATUSBAR_X_POS; |
270 | #ifdef HAVE_REMOTE_LCD | 269 | if (statusbar_position(display->screen_type) != STATUSBAR_BOTTOM) |
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; | 270 | vp.y = 0; |
278 | else | 271 | else |
279 | vp.y = display->lcdheight - STATUSBAR_HEIGHT; | 272 | vp.y = display->lcdheight - STATUSBAR_HEIGHT; |
@@ -829,3 +822,11 @@ void gui_statusbar_changed(int enabled) | |||
829 | (void)enabled; | 822 | (void)enabled; |
830 | send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); | 823 | send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); |
831 | } | 824 | } |
825 | #ifdef HAVE_REMOTE_LCD | ||
826 | int statusbar_position(int screen) | ||
827 | { | ||
828 | if (screen == SCREEN_REMOTE) | ||
829 | return global_settings.remote_statusbar; | ||
830 | return global_settings.statusbar; | ||
831 | } | ||
832 | #endif | ||