diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c index 7ce4beacaf..e68e74b2c2 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -117,7 +117,7 @@ offset abs | |||
117 | 0x23 0x37 <rec. left gain (bit 0-3)> | 117 | 0x23 0x37 <rec. left gain (bit 0-3)> |
118 | 0x24 0x38 <rec. right gain (bit 0-3)> | 118 | 0x24 0x38 <rec. right gain (bit 0-3)> |
119 | 0x25 0x39 <disk poweroff flag (bit 0), MP3 buffer margin (bit 1-3), | 119 | 0x25 0x39 <disk poweroff flag (bit 0), MP3 buffer margin (bit 1-3), |
120 | Trickle charge flag (bit 4)> | 120 | Trickle charge flag (bit 4), buttonbar (bit 5)> |
121 | 0x26 0x40 <runtime low byte> | 121 | 0x26 0x40 <runtime low byte> |
122 | 0x27 0x41 <runtime high byte> | 122 | 0x27 0x41 <runtime high byte> |
123 | 0x28 0x42 <topruntime low byte> | 123 | 0x28 0x42 <topruntime low byte> |
@@ -396,7 +396,8 @@ int settings_save( void ) | |||
396 | config_block[0x25] = (unsigned char) | 396 | config_block[0x25] = (unsigned char) |
397 | ((global_settings.disk_poweroff & 1) | | 397 | ((global_settings.disk_poweroff & 1) | |
398 | ((global_settings.buffer_margin & 7) << 1) | | 398 | ((global_settings.buffer_margin & 7) << 1) | |
399 | ((global_settings.trickle_charge & 1) << 4)); | 399 | ((global_settings.trickle_charge & 1) << 4) | |
400 | ((global_settings.buttonbar & 1) << 5)); | ||
400 | 401 | ||
401 | { | 402 | { |
402 | int elapsed_secs; | 403 | int elapsed_secs; |
@@ -723,6 +724,7 @@ void settings_load(void) | |||
723 | global_settings.disk_poweroff = config_block[0x25] & 1; | 724 | global_settings.disk_poweroff = config_block[0x25] & 1; |
724 | global_settings.buffer_margin = (config_block[0x25] >> 1) & 7; | 725 | global_settings.buffer_margin = (config_block[0x25] >> 1) & 7; |
725 | global_settings.trickle_charge = (config_block[0x25] >> 4) & 1; | 726 | global_settings.trickle_charge = (config_block[0x25] >> 4) & 1; |
727 | global_settings.buttonbar = (config_block[0x25] >> 5) & 1; | ||
726 | } | 728 | } |
727 | 729 | ||
728 | if (config_block[0x27] != 0xff) | 730 | if (config_block[0x27] != 0xff) |
@@ -977,6 +979,8 @@ bool settings_load_config(char* file) | |||
977 | set_cfg_int(&global_settings.scroll_step, value, 1, LCD_WIDTH); | 979 | set_cfg_int(&global_settings.scroll_step, value, 1, LCD_WIDTH); |
978 | else if (!strcasecmp(name, "statusbar")) | 980 | else if (!strcasecmp(name, "statusbar")) |
979 | set_cfg_bool(&global_settings.statusbar, value); | 981 | set_cfg_bool(&global_settings.statusbar, value); |
982 | else if (!strcasecmp(name, "buttonbar")) | ||
983 | set_cfg_bool(&global_settings.buttonbar, value); | ||
980 | else if (!strcasecmp(name, "peak meter release")) | 984 | else if (!strcasecmp(name, "peak meter release")) |
981 | set_cfg_int(&global_settings.peak_meter_release, value, 1, 0x7e); | 985 | set_cfg_int(&global_settings.peak_meter_release, value, 1, 0x7e); |
982 | else if (!strcasecmp(name, "peak meter hold")) { | 986 | else if (!strcasecmp(name, "peak meter hold")) { |
@@ -1336,8 +1340,9 @@ bool settings_save_config(void) | |||
1336 | fprintf(fd, "#\r\n# Display\r\n#\r\n"); | 1340 | fprintf(fd, "#\r\n# Display\r\n#\r\n"); |
1337 | 1341 | ||
1338 | #ifdef HAVE_LCD_BITMAP | 1342 | #ifdef HAVE_LCD_BITMAP |
1339 | fprintf(fd, "statusbar: %s\r\nscrollbar: %s\r\n", | 1343 | fprintf(fd, "statusbar: %s\r\nbuttonbar: %s\r\nscrollbar: %s\r\n", |
1340 | boolopt[global_settings.statusbar], | 1344 | boolopt[global_settings.statusbar], |
1345 | boolopt[global_settings.buttonbar], | ||
1341 | boolopt[global_settings.scrollbar]); | 1346 | boolopt[global_settings.scrollbar]); |
1342 | 1347 | ||
1343 | { | 1348 | { |
@@ -1588,6 +1593,7 @@ void settings_reset(void) { | |||
1588 | global_settings.dirfilter = SHOW_MUSIC; | 1593 | global_settings.dirfilter = SHOW_MUSIC; |
1589 | global_settings.sort_case = false; | 1594 | global_settings.sort_case = false; |
1590 | global_settings.statusbar = true; | 1595 | global_settings.statusbar = true; |
1596 | global_settings.buttonbar = true; | ||
1591 | global_settings.scrollbar = true; | 1597 | global_settings.scrollbar = true; |
1592 | global_settings.repeat_mode = REPEAT_ALL; | 1598 | global_settings.repeat_mode = REPEAT_ALL; |
1593 | global_settings.playlist_shuffle = false; | 1599 | global_settings.playlist_shuffle = false; |