diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-08-26 13:21:14 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-08-26 13:21:14 +0000 |
| commit | 457b8a0a6743b7bee72d90e484055b7635861612 (patch) | |
| tree | e3256d74445f89d6a89df31255eb59a179ee3d11 /apps/settings.c | |
| parent | 006c46675e5677fc483c0a9e36a8bd65e488cf8b (diff) | |
| download | rockbox-457b8a0a6743b7bee72d90e484055b7635861612.zip rockbox-457b8a0a6743b7bee72d90e484055b7635861612.tar.gz rockbox-457b8a0a6743b7bee72d90e484055b7635861612.tar.bz2 rockbox-457b8a0a6743b7bee72d90e484055b7635861612.tar.xz | |
Added configurable disk spindown. The disk will also now not spin down while you are running around in the dir browser or pressing buttons in the wps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1987 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
| -rw-r--r-- | apps/settings.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index 11a4647..441abb5 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -268,7 +268,8 @@ int settings_save( void ) config_block[0x10] = (unsigned char)global_settings.ff_rewind; config_block[0x11] = (unsigned char)global_settings.avc; - + config_block[0x1a] = (unsigned char)global_settings.disk_spindown; + memcpy(&config_block[0x12], &global_settings.resume_index, 4); memcpy(&config_block[0x16], &global_settings.resume_offset, 4); memcpy(&config_block[0xF8], &global_settings.resume_seed, 4); @@ -369,6 +370,9 @@ void settings_load(void) if (config_block[0x16] != 0xFF) memcpy(&global_settings.resume_offset, &config_block[0x16], 4); + if (config_block[0x1a] != 0xFF) + global_settings.disk_spindown = config_block[0x1a]; + memcpy(&global_settings.resume_seed, &config_block[0xF8], 4); if (config_block[0x24] != 0xFF) @@ -380,6 +384,7 @@ void settings_load(void) lcd_set_contrast(global_settings.contrast); lcd_scroll_speed(global_settings.scroll_speed); backlight_time(global_settings.backlight); + ata_spindown(global_settings.disk_spindown); #ifdef HAVE_CHARGE_CTRL charge_restart_level = global_settings.discharge ? CHARGE_RESTART_LO : CHARGE_RESTART_HI; #endif @@ -416,6 +421,7 @@ void settings_reset(void) { global_settings.ff_rewind = DEFAULT_FF_REWIND_SETTING; global_settings.resume_index = -1; global_settings.resume_offset = -1; + global_settings.disk_spindown = 5; } |