diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-09-24 19:12:09 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-09-24 19:12:09 +0000 |
commit | a7dcf912e1be349da3dadeaf235ee4faf5e9dbaa (patch) | |
tree | 5bc79ed6c56a86ffded950f3679368408c0c758e /apps/settings.c | |
parent | cae1d3b115821b055bd528f08ee5179f2d85ff8f (diff) | |
download | rockbox-a7dcf912e1be349da3dadeaf235ee4faf5e9dbaa.tar.gz rockbox-a7dcf912e1be349da3dadeaf235ee4faf5e9dbaa.zip |
Merged 'mp3 filter' and 'show hidden files' into a single filter option.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2405 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 13 |
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 | |||
71 | 0x0b 0x1f <backlight byte> | 71 | 0x0b 0x1f <backlight byte> |
72 | 0x0c 0x20 <poweroff timer byte> | 72 | 0x0c 0x20 <poweroff timer byte> |
73 | 0x0d 0x21 <resume settings byte> | 73 | 0x0d 0x21 <resume settings byte> |
74 | 0x0e 0x22 <shuffle,mp3filter,sort_case,discharge,statusbar,show_hidden, | 74 | 0x0e 0x22 <shuffle,dirfilter,sort_case,discharge,statusbar,show_hidden, |
75 | scroll bar> | 75 | scroll bar> |
76 | 0x0f 0x23 <scroll speed> | 76 | 0x0f 0x23 <scroll speed> |
77 | 0x10 0x24 <ff/rewind min step, acceleration rate> | 77 | 0x10 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; |