From 5a9e8929cd38604f2a4ea6a9350830ef42c533d6 Mon Sep 17 00:00:00 2001 From: Robert Hak Date: Sat, 26 Oct 2002 05:26:23 +0000 Subject: battery/volume status can be displayed numerically git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2750 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'apps/settings.c') 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 0x0d 0x21 0x0e 0x22 -0x0f 0x23 +0x0f 0x23 0x10 0x24 0x11 0x25 0x12 0x26 <(int) Resume playlist index, or -1 if no playlist resume> @@ -294,10 +294,12 @@ int settings_save( void ) ((global_settings.statusbar & 1) << 4) | ((global_settings.dirfilter & 2) << 4) | ((global_settings.scrollbar & 1) << 6)); - + config_block[0xf] = (unsigned char) - ((global_settings.timeformat & 1) << 2) | - ((global_settings.scroll_speed << 3)); + (((global_settings.timeformat & 1) << 2) | + ( global_settings.scroll_speed << 3) | + ((global_settings.volume_type & 1) << 4) | + ((global_settings.battery_type & 1) << 5)); config_block[0x10] = (unsigned char) ((global_settings.ff_rewind_min_step & 15) << 4 | @@ -466,6 +468,8 @@ void settings_load(void) if (config_block[0xf] != 0xFF) { global_settings.timeformat = (config_block[0xf] >> 2) & 1; global_settings.scroll_speed = config_block[0xf] >> 3; + global_settings.volume_type = (config_block[0xf] >> 4) & 1; + global_settings.battery_type = (config_block[0xf] >> 5) & 1; } if (config_block[0x10] != 0xFF) { @@ -670,6 +674,8 @@ void settings_reset(void) { global_settings.discharge = 0; global_settings.total_uptime = 0; global_settings.timeformat = 0; + global_settings.volume_type = 0; + global_settings.battery_type = 0; global_settings.scroll_speed = 8; global_settings.ff_rewind_min_step = DEFAULT_FF_REWIND_MIN_STEP; global_settings.ff_rewind_accel = DEFAULT_FF_REWIND_ACCEL_SETTING; -- cgit v1.2.3