summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 673bca70d1..e488be30da 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -71,7 +71,7 @@ offset abs
710x0b 0x1f <backlight byte> 710x0b 0x1f <backlight byte>
720x0c 0x20 <poweroff timer byte> 720x0c 0x20 <poweroff timer byte>
730x0d 0x21 <resume settings byte> 730x0d 0x21 <resume settings byte>
740x0e 0x22 <shuffle,mp3filter,sort_case,discharge,statusbar,show_hidden, 740x0e 0x22 <shuffle,dirfilter,sort_case,discharge,statusbar,show_hidden,
75 scroll bar> 75 scroll bar>
760x0f 0x23 <scroll speed> 760x0f 0x23 <scroll speed>
770x10 0x24 <ff/rewind min step, acceleration rate> 770x10 0x24 <ff/rewind min step, acceleration rate>
@@ -267,11 +267,11 @@ int settings_save( void )
267 267
268 config_block[0xe] = (unsigned char) 268 config_block[0xe] = (unsigned char)
269 ((global_settings.playlist_shuffle & 1) | 269 ((global_settings.playlist_shuffle & 1) |
270 ((global_settings.mp3filter & 1) << 1) | 270 ((global_settings.dirfilter & 1) << 1) |
271 ((global_settings.sort_case & 1) << 2) | 271 ((global_settings.sort_case & 1) << 2) |
272 ((global_settings.discharge & 1) << 3) | 272 ((global_settings.discharge & 1) << 3) |
273 ((global_settings.statusbar & 1) << 4) | 273 ((global_settings.statusbar & 1) << 4) |
274 ((global_settings.show_hidden_files & 1) << 5) | 274 ((global_settings.dirfilter & 2) << 4) |
275 ((global_settings.scrollbar & 1) << 6)); 275 ((global_settings.scrollbar & 1) << 6));
276 276
277 config_block[0xf] = (unsigned char)(global_settings.scroll_speed << 3); 277 config_block[0xf] = (unsigned char)(global_settings.scroll_speed << 3);
@@ -361,11 +361,11 @@ void settings_load(void)
361 global_settings.resume = config_block[0xd]; 361 global_settings.resume = config_block[0xd];
362 if (config_block[0xe] != 0xFF) { 362 if (config_block[0xe] != 0xFF) {
363 global_settings.playlist_shuffle = config_block[0xe] & 1; 363 global_settings.playlist_shuffle = config_block[0xe] & 1;
364 global_settings.mp3filter = (config_block[0xe] >> 1) & 1; 364 global_settings.dirfilter = (config_block[0xe] >> 1) & 1;
365 global_settings.sort_case = (config_block[0xe] >> 2) & 1; 365 global_settings.sort_case = (config_block[0xe] >> 2) & 1;
366 global_settings.discharge = (config_block[0xe] >> 3) & 1; 366 global_settings.discharge = (config_block[0xe] >> 3) & 1;
367 global_settings.statusbar = (config_block[0xe] >> 4) & 1; 367 global_settings.statusbar = (config_block[0xe] >> 4) & 1;
368 global_settings.show_hidden_files = (config_block[0xe] >> 5) & 1; 368 global_settings.dirfilter |= ((config_block[0xe] >> 5) & 1) << 1;
369 global_settings.scrollbar = (config_block[0xe] >> 6) & 1; 369 global_settings.scrollbar = (config_block[0xe] >> 6) & 1;
370 /* Don't use the last bit, it must be unused to detect 370 /* Don't use the last bit, it must be unused to detect
371 an uninitialized entry */ 371 an uninitialized entry */
@@ -594,7 +594,7 @@ void settings_reset(void) {
594 global_settings.contrast = DEFAULT_CONTRAST_SETTING; 594 global_settings.contrast = DEFAULT_CONTRAST_SETTING;
595 global_settings.poweroff = DEFAULT_POWEROFF_SETTING; 595 global_settings.poweroff = DEFAULT_POWEROFF_SETTING;
596 global_settings.backlight = DEFAULT_BACKLIGHT_SETTING; 596 global_settings.backlight = DEFAULT_BACKLIGHT_SETTING;
597 global_settings.mp3filter = true; 597 global_settings.dirfilter = SHOW_MUSIC;
598 global_settings.sort_case = false; 598 global_settings.sort_case = false;
599 global_settings.statusbar = true; 599 global_settings.statusbar = true;
600 global_settings.scrollbar = true; 600 global_settings.scrollbar = true;
@@ -603,7 +603,6 @@ void settings_reset(void) {
603 global_settings.discharge = 0; 603 global_settings.discharge = 0;
604 global_settings.total_uptime = 0; 604 global_settings.total_uptime = 0;
605 global_settings.scroll_speed = 8; 605 global_settings.scroll_speed = 8;
606 global_settings.show_hidden_files = false;
607 global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP; 606 global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP;
608 global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING; 607 global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING;
609 global_settings.resume_index = -1; 608 global_settings.resume_index = -1;