diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-06-06 22:23:52 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-06-06 22:23:52 +0000 |
commit | 0dd1f8ec11f28fe34c93ba97af95eb2be2fef44f (patch) | |
tree | e3e77d4e6b25b82c82b3570cd8c4a988c7788e66 /apps/settings_menu.c | |
parent | 8c9e22580e220b793130ed3ac67b9c54e85b3d0f (diff) | |
download | rockbox-0dd1f8ec11f28fe34c93ba97af95eb2be2fef44f.tar.gz rockbox-0dd1f8ec11f28fe34c93ba97af95eb2be2fef44f.zip |
Work-in-progress rework of charging status reading & display: * Changed several charging related HAVE_* macros into one multi-value CONFIG_CHARGING. * Always use proper macros for charging states. * Battery symbol charging animation now starts from current level on all targets with charging. Two-colour animation kept for non-b&w targets. Round down fill level while charging as before, but round to nearest pixel value for discharging on all targets. * Charging anim fixed on player. * Some code cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10080 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r-- | apps/settings_menu.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index bcf5a784c0..821ad53dec 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -81,7 +81,7 @@ void dac_line_in(bool enable); | |||
81 | #include "backdrop.h" | 81 | #include "backdrop.h" |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #ifdef HAVE_CHARGING | 84 | #ifdef CONFIG_CHARGING |
85 | static bool car_adapter_mode(void) | 85 | static bool car_adapter_mode(void) |
86 | { | 86 | { |
87 | return set_bool( str(LANG_CAR_ADAPTER_MODE), | 87 | return set_bool( str(LANG_CAR_ADAPTER_MODE), |
@@ -177,7 +177,7 @@ static bool caption_backlight(void) | |||
177 | &global_settings.caption_backlight); | 177 | &global_settings.caption_backlight); |
178 | } | 178 | } |
179 | 179 | ||
180 | #ifdef HAVE_CHARGING | 180 | #ifdef CONFIG_CHARGING |
181 | static bool backlight_timer_plugged(void) | 181 | static bool backlight_timer_plugged(void) |
182 | { | 182 | { |
183 | return set_option((char *)str(LANG_BACKLIGHT_ON_WHEN_CHARGING), | 183 | return set_option((char *)str(LANG_BACKLIGHT_ON_WHEN_CHARGING), |
@@ -248,7 +248,7 @@ static bool remote_backlight_timer(void) | |||
248 | remote_backlight_set_timeout ); | 248 | remote_backlight_set_timeout ); |
249 | } | 249 | } |
250 | 250 | ||
251 | #ifdef HAVE_CHARGING | 251 | #ifdef CONFIG_CHARGING |
252 | static bool remote_backlight_timer_plugged(void) | 252 | static bool remote_backlight_timer_plugged(void) |
253 | { | 253 | { |
254 | return set_option((char *)str(LANG_BACKLIGHT_ON_WHEN_CHARGING), | 254 | return set_option((char *)str(LANG_BACKLIGHT_ON_WHEN_CHARGING), |
@@ -1715,7 +1715,7 @@ static bool lcd_settings_menu(void) | |||
1715 | static const struct menu_item items[] = { | 1715 | static const struct menu_item items[] = { |
1716 | #ifdef CONFIG_BACKLIGHT | 1716 | #ifdef CONFIG_BACKLIGHT |
1717 | { ID2P(LANG_BACKLIGHT), backlight_timer }, | 1717 | { ID2P(LANG_BACKLIGHT), backlight_timer }, |
1718 | #ifdef HAVE_CHARGING | 1718 | #ifdef CONFIG_CHARGING |
1719 | { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_timer_plugged }, | 1719 | { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), backlight_timer_plugged }, |
1720 | #endif | 1720 | #endif |
1721 | { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight }, | 1721 | { ID2P(LANG_CAPTION_BACKLIGHT), caption_backlight }, |
@@ -1763,7 +1763,7 @@ static bool lcd_remote_settings_menu(void) | |||
1763 | 1763 | ||
1764 | static const struct menu_item items[] = { | 1764 | static const struct menu_item items[] = { |
1765 | { ID2P(LANG_BACKLIGHT), remote_backlight_timer }, | 1765 | { ID2P(LANG_BACKLIGHT), remote_backlight_timer }, |
1766 | #ifdef HAVE_CHARGING | 1766 | #ifdef CONFIG_CHARGING |
1767 | { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), | 1767 | { ID2P(LANG_BACKLIGHT_ON_WHEN_CHARGING), |
1768 | remote_backlight_timer_plugged }, | 1768 | remote_backlight_timer_plugged }, |
1769 | #endif | 1769 | #endif |
@@ -1860,10 +1860,8 @@ static bool battery_settings_menu(void) | |||
1860 | { ID2P(LANG_BATTERY_TYPE), battery_type }, | 1860 | { ID2P(LANG_BATTERY_TYPE), battery_type }, |
1861 | #endif | 1861 | #endif |
1862 | #else | 1862 | #else |
1863 | #ifndef HAVE_CHARGE_CTRL | ||
1864 | { "Dummy", NULL }, /* to have an entry at all, in the simulator */ | 1863 | { "Dummy", NULL }, /* to have an entry at all, in the simulator */ |
1865 | #endif | 1864 | #endif |
1866 | #endif | ||
1867 | }; | 1865 | }; |
1868 | 1866 | ||
1869 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, | 1867 | m=menu_init( items, sizeof(items) / sizeof(*items), NULL, |
@@ -1975,7 +1973,7 @@ static bool system_settings_menu(void) | |||
1975 | #if CONFIG_CODEC == MAS3507D | 1973 | #if CONFIG_CODEC == MAS3507D |
1976 | { ID2P(LANG_LINE_IN), line_in }, | 1974 | { ID2P(LANG_LINE_IN), line_in }, |
1977 | #endif | 1975 | #endif |
1978 | #ifdef HAVE_CHARGING | 1976 | #ifdef CONFIG_CHARGING |
1979 | { ID2P(LANG_CAR_ADAPTER_MODE), car_adapter_mode }, | 1977 | { ID2P(LANG_CAR_ADAPTER_MODE), car_adapter_mode }, |
1980 | #endif | 1978 | #endif |
1981 | }; | 1979 | }; |