forked from len0rd/rockbox
Set the default battery capacity for ipod video properly depending on detected RAM size.
Also set up a callback for the battery capacity setting (for all players) so changes take effect without having to reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30170 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
354d8fbc63
commit
aa27d47782
6 changed files with 52 additions and 8 deletions
|
@ -784,10 +784,20 @@ const struct settings_list settings[] = {
|
|||
#define BATTERY_CAPACITY_MAX BATTERY_CAPACITY_DEFAULT
|
||||
#define BATTERY_CAPACITY_INC 0
|
||||
#endif
|
||||
#ifdef IPOD_VIDEO
|
||||
/* its easier to leave this one un-macro()ed for the time being */
|
||||
{ F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.battery_capacity,
|
||||
LANG_BATTERY_CAPACITY, FUNCTYPE(battery_default_capacity),
|
||||
"battery capacity", NULL , {
|
||||
.int_setting = (struct int_setting[]) {
|
||||
{ set_battery_capacity, UNIT_MAH, BATTERY_CAPACITY_MIN,
|
||||
BATTERY_CAPACITY_MAX, BATTERY_CAPACITY_INC, NULL, NULL }}}},
|
||||
#else /* IPOD_VIDEO */
|
||||
INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY,
|
||||
BATTERY_CAPACITY_DEFAULT, "battery capacity", UNIT_MAH,
|
||||
BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX,
|
||||
BATTERY_CAPACITY_INC, NULL, NULL, NULL),
|
||||
BATTERY_CAPACITY_INC, NULL, NULL, set_battery_capacity),
|
||||
#endif /* IPOD_VIDEO */
|
||||
#endif
|
||||
#if CONFIG_CHARGING
|
||||
OFFON_SETTING(NVRAM(1), car_adapter_mode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue