diff options
author | Robert Hak <adiamas@rockbox.org> | 2002-10-26 05:26:23 +0000 |
---|---|---|
committer | Robert Hak <adiamas@rockbox.org> | 2002-10-26 05:26:23 +0000 |
commit | 5a9e8929cd38604f2a4ea6a9350830ef42c533d6 (patch) | |
tree | 7f872a27f4fbcf33afa024e8554d54546df61439 /apps/settings.c | |
parent | 061763b2a679da199f14da5de36b307705b8c7d0 (diff) | |
download | rockbox-5a9e8929cd38604f2a4ea6a9350830ef42c533d6.tar.gz rockbox-5a9e8929cd38604f2a4ea6a9350830ef42c533d6.zip |
battery/volume status can be displayed numerically
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2750 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c index 6c0b21d088..b0da64f42a 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -82,7 +82,7 @@ offset abs | |||
82 | 0x0d 0x21 <resume settings byte> | 82 | 0x0d 0x21 <resume settings byte> |
83 | 0x0e 0x22 <shuffle,dirfilter,sort_case,discharge,statusbar,show_hidden, | 83 | 0x0e 0x22 <shuffle,dirfilter,sort_case,discharge,statusbar,show_hidden, |
84 | scroll bar> | 84 | scroll bar> |
85 | 0x0f 0x23 <scroll speed> | 85 | 0x0f 0x23 <timeformat, scroll speed. volume type, battery type> |
86 | 0x10 0x24 <ff/rewind min step, acceleration rate> | 86 | 0x10 0x24 <ff/rewind min step, acceleration rate> |
87 | 0x11 0x25 <AVC, channel config> | 87 | 0x11 0x25 <AVC, channel config> |
88 | 0x12 0x26 <(int) Resume playlist index, or -1 if no playlist resume> | 88 | 0x12 0x26 <(int) Resume playlist index, or -1 if no playlist resume> |
@@ -294,10 +294,12 @@ int settings_save( void ) | |||
294 | ((global_settings.statusbar & 1) << 4) | | 294 | ((global_settings.statusbar & 1) << 4) | |
295 | ((global_settings.dirfilter & 2) << 4) | | 295 | ((global_settings.dirfilter & 2) << 4) | |
296 | ((global_settings.scrollbar & 1) << 6)); | 296 | ((global_settings.scrollbar & 1) << 6)); |
297 | 297 | ||
298 | config_block[0xf] = (unsigned char) | 298 | config_block[0xf] = (unsigned char) |
299 | ((global_settings.timeformat & 1) << 2) | | 299 | (((global_settings.timeformat & 1) << 2) | |
300 | ((global_settings.scroll_speed << 3)); | 300 | ( global_settings.scroll_speed << 3) | |
301 | ((global_settings.volume_type & 1) << 4) | | ||
302 | ((global_settings.battery_type & 1) << 5)); | ||
301 | 303 | ||
302 | config_block[0x10] = (unsigned char) | 304 | config_block[0x10] = (unsigned char) |
303 | ((global_settings.ff_rewind_min_step & 15) << 4 | | 305 | ((global_settings.ff_rewind_min_step & 15) << 4 | |
@@ -466,6 +468,8 @@ void settings_load(void) | |||
466 | if (config_block[0xf] != 0xFF) { | 468 | if (config_block[0xf] != 0xFF) { |
467 | global_settings.timeformat = (config_block[0xf] >> 2) & 1; | 469 | global_settings.timeformat = (config_block[0xf] >> 2) & 1; |
468 | global_settings.scroll_speed = config_block[0xf] >> 3; | 470 | global_settings.scroll_speed = config_block[0xf] >> 3; |
471 | global_settings.volume_type = (config_block[0xf] >> 4) & 1; | ||
472 | global_settings.battery_type = (config_block[0xf] >> 5) & 1; | ||
469 | } | 473 | } |
470 | 474 | ||
471 | if (config_block[0x10] != 0xFF) { | 475 | if (config_block[0x10] != 0xFF) { |
@@ -670,6 +674,8 @@ void settings_reset(void) { | |||
670 | global_settings.discharge = 0; | 674 | global_settings.discharge = 0; |
671 | global_settings.total_uptime = 0; | 675 | global_settings.total_uptime = 0; |
672 | global_settings.timeformat = 0; | 676 | global_settings.timeformat = 0; |
677 | global_settings.volume_type = 0; | ||
678 | global_settings.battery_type = 0; | ||
673 | global_settings.scroll_speed = 8; | 679 | global_settings.scroll_speed = 8; |
674 | global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP; | 680 | global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP; |
675 | global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING; | 681 | global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING; |