diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings.c | 16 |
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 ) | |||
353 | ((global_settings.avc & 0x03) | | 353 | ((global_settings.avc & 0x03) | |
354 | ((global_settings.channel_config & 0x07) << 2)); | 354 | ((global_settings.channel_config & 0x07) << 2)); |
355 | 355 | ||
356 | memcpy(&config_block[0x12], &global_settings.resume_index, 2); | 356 | *((short*)(&config_block[0x12])) = global_settings.resume_index; |
357 | memcpy(&config_block[0x14], &global_settings.resume_first_index, 2); | 357 | *((short*)(&config_block[0x14])) = global_settings.resume_first_index; |
358 | memcpy(&config_block[0x16], &global_settings.resume_offset, 4); | 358 | *((int*)(&config_block[0x16])) = global_settings.resume_offset; |
359 | DEBUGF( "+Resume index %X offset %X\n", | 359 | DEBUGF( "+Resume index %X offset %X\n", |
360 | global_settings.resume_index, | 360 | global_settings.resume_index, |
361 | global_settings.resume_offset ); | 361 | global_settings.resume_offset ); |
@@ -370,7 +370,7 @@ int settings_save( void ) | |||
370 | (global_settings.flip_display ? 0x40 : 0) | | 370 | (global_settings.flip_display ? 0x40 : 0) | |
371 | (global_settings.rec_editable?0x80:0); | 371 | (global_settings.rec_editable?0x80:0); |
372 | 372 | ||
373 | memcpy(&config_block[0x1d], &global_settings.resume_seed, 4); | 373 | *((int*)(&config_block[0x1d])) = global_settings.resume_seed; |
374 | 374 | ||
375 | config_block[0x21] = (unsigned char) | 375 | config_block[0x21] = (unsigned char) |
376 | ((global_settings.repeat_mode & 3) | | 376 | ((global_settings.repeat_mode & 3) | |
@@ -654,13 +654,13 @@ void settings_load(void) | |||
654 | } | 654 | } |
655 | 655 | ||
656 | if (config_block[0x12] != 0xFF) | 656 | if (config_block[0x12] != 0xFF) |
657 | memcpy(&global_settings.resume_index, &config_block[0x12], 2); | 657 | global_settings.resume_index = *((short*)(&config_block[0x12])); |
658 | 658 | ||
659 | if (config_block[0x14] != 0xFF) | 659 | if (config_block[0x14] != 0xFF) |
660 | memcpy(&global_settings.resume_first_index, &config_block[0x14], 2); | 660 | global_settings.resume_first_index= *((short*)(&config_block[0x14])); |
661 | 661 | ||
662 | if (config_block[0x16] != 0xFF) | 662 | if (config_block[0x16] != 0xFF) |
663 | memcpy(&global_settings.resume_offset, &config_block[0x16], 4); | 663 | global_settings.resume_offset = *((int*)(&config_block[0x16])); |
664 | 664 | ||
665 | if (config_block[0x1a] != 0xFF) | 665 | if (config_block[0x1a] != 0xFF) |
666 | global_settings.disk_spindown = config_block[0x1a]; | 666 | global_settings.disk_spindown = config_block[0x1a]; |
@@ -681,7 +681,7 @@ void settings_load(void) | |||
681 | } | 681 | } |
682 | 682 | ||
683 | if (config_block[0x1d] != 0xFF) | 683 | if (config_block[0x1d] != 0xFF) |
684 | memcpy(&global_settings.resume_seed, &config_block[0x1d], 4); | 684 | global_settings.resume_seed = *((int*)(&config_block[0x1d])); |
685 | 685 | ||
686 | if (config_block[0x21] != 0xFF) | 686 | if (config_block[0x21] != 0xFF) |
687 | { | 687 | { |