summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2004-01-16 00:18:33 +0000
committerBjörn Stenberg <bjorn@haxx.se>2004-01-16 00:18:33 +0000
commitbaa991a89d86b17bdf9cc1f8190a3fa853e8ae48 (patch)
tree47e3db3ecc368750479c0a8c15338cc3475cfb30
parentc5f0b4606549c8f37f62984e66c03553786ac458 (diff)
downloadrockbox-baa991a89d86b17bdf9cc1f8190a3fa853e8ae48.tar.gz
rockbox-baa991a89d86b17bdf9cc1f8190a3fa853e8ae48.zip
Fixed resume problem (caused by the change from short to int)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4244 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/settings.c b/apps/settings.c
index a342acc746..1663929e7f 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -353,9 +353,9 @@ int settings_save( void )
((global_settings.avc & 0x03) |
((global_settings.channel_config & 0x07) << 2));
- memcpy(&config_block[0x12], &global_settings.resume_index, 2);
- memcpy(&config_block[0x14], &global_settings.resume_first_index, 2);
- memcpy(&config_block[0x16], &global_settings.resume_offset, 4);
+ *((short*)(&config_block[0x12])) = global_settings.resume_index;
+ *((short*)(&config_block[0x14])) = global_settings.resume_first_index;
+ *((int*)(&config_block[0x16])) = global_settings.resume_offset;
DEBUGF( "+Resume index %X offset %X\n",
global_settings.resume_index,
global_settings.resume_offset );
@@ -370,7 +370,7 @@ int settings_save( void )
(global_settings.flip_display ? 0x40 : 0) |
(global_settings.rec_editable?0x80:0);
- memcpy(&config_block[0x1d], &global_settings.resume_seed, 4);
+ *((int*)(&config_block[0x1d])) = global_settings.resume_seed;
config_block[0x21] = (unsigned char)
((global_settings.repeat_mode & 3) |
@@ -654,13 +654,13 @@ void settings_load(void)
}
if (config_block[0x12] != 0xFF)
- memcpy(&global_settings.resume_index, &config_block[0x12], 2);
+ global_settings.resume_index = *((short*)(&config_block[0x12]));
if (config_block[0x14] != 0xFF)
- memcpy(&global_settings.resume_first_index, &config_block[0x14], 2);
+ global_settings.resume_first_index= *((short*)(&config_block[0x14]));
if (config_block[0x16] != 0xFF)
- memcpy(&global_settings.resume_offset, &config_block[0x16], 4);
+ global_settings.resume_offset = *((int*)(&config_block[0x16]));
if (config_block[0x1a] != 0xFF)
global_settings.disk_spindown = config_block[0x1a];
@@ -681,7 +681,7 @@ void settings_load(void)
}
if (config_block[0x1d] != 0xFF)
- memcpy(&global_settings.resume_seed, &config_block[0x1d], 4);
+ global_settings.resume_seed = *((int*)(&config_block[0x1d]));
if (config_block[0x21] != 0xFF)
{