summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-24 00:03:59 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-24 00:03:59 +0000
commit5850207d332f78d4fcf4a7ec22ae8b95b921a183 (patch)
tree3a2be4c63c11c69b1a1fae5d0a5008bf217677c1 /apps/gui
parent19f44a61cfb333c363d823e43b5de282ef2d2ed0 (diff)
downloadrockbox-5850207d332f78d4fcf4a7ec22ae8b95b921a183.tar.gz
rockbox-5850207d332f78d4fcf4a7ec22ae8b95b921a183.zip
Slightly change parts of the previous commit to reuse existing code, and enforce enum statusbar_values instead of just int,
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22485 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/statusbar.c10
-rw-r--r--apps/gui/statusbar.h2
2 files changed, 3 insertions, 9 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 1a724406ef..7a361e58ed 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -827,13 +827,7 @@ void gui_statusbar_changed( enum screen_type screen,
827 enum statusbar_values old) 827 enum statusbar_values old)
828{ 828{
829 /* clear and update the statusbar area to remove old parts */ 829 /* clear and update the statusbar area to remove old parts */
830 enum statusbar_values bar; 830 enum statusbar_values bar = statusbar_position(screen);
831#ifdef HAVE_REMOTE_LCD
832 if (screen == SCREEN_REMOTE)
833 bar = global_settings.remote_statusbar;
834 else
835#endif
836 bar = global_settings.statusbar;
837 831
838 struct screen *display = &screens[screen]; 832 struct screen *display = &screens[screen];
839 struct viewport vp; 833 struct viewport vp;
@@ -850,7 +844,7 @@ void gui_statusbar_changed( enum screen_type screen,
850#endif 844#endif
851 845
852#ifdef HAVE_REMOTE_LCD 846#ifdef HAVE_REMOTE_LCD
853int statusbar_position(int screen) 847enum statusbar_values statusbar_position(int screen)
854{ 848{
855 if (screen == SCREEN_REMOTE) 849 if (screen == SCREEN_REMOTE)
856 return global_settings.remote_statusbar; 850 return global_settings.remote_statusbar;
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h
index 169b76b15a..84d37858e2 100644
--- a/apps/gui/statusbar.h
+++ b/apps/gui/statusbar.h
@@ -107,7 +107,7 @@ void gui_statusbar_changed(enum screen_type screen,
107#if !defined(HAVE_REMOTE_LCD) || defined(__PCTOOL__) 107#if !defined(HAVE_REMOTE_LCD) || defined(__PCTOOL__)
108#define statusbar_position(a) (global_settings.statusbar) 108#define statusbar_position(a) (global_settings.statusbar)
109#else 109#else
110int statusbar_position(int screen); 110enum statusbar_values statusbar_position(int screen);
111#endif 111#endif
112 112
113#endif /*_GUI_STATUSBAR_H_*/ 113#endif /*_GUI_STATUSBAR_H_*/