diff --git a/software/sys_controller/ossc/userdata.c b/software/sys_controller/ossc/userdata.c index 78e371f..55d9c6e 100644 --- a/software/sys_controller/ossc/userdata.c +++ b/software/sys_controller/ossc/userdata.c @@ -322,7 +322,7 @@ int import_userdata() // Just blindly write the entry to flash retval = copy_sd_to_flash((512+n*SECTORSIZE)/SD_BLK_SIZE, (n*PAGES_PER_SECTOR)+(USERDATA_OFFSET/PAGESIZE), - (header.type == UDE_PROFILE) ? sizeof(ude_profile) : sizeof(ude_initcfg), databuf); + (header.type == UDE_PROFILE) ? (sizeof(ude_profile)+sizeof(video_modes_plm_default)) : sizeof(ude_initcfg), databuf); if (retval != 0) { printf("Copy from SD to flash failed (error %d)\n", retval); goto sd_disable; diff --git a/software/sys_controller/ossc/video_modes.c b/software/sys_controller/ossc/video_modes.c index 8e4ff7d..cdcd790 100644 --- a/software/sys_controller/ossc/video_modes.c +++ b/software/sys_controller/ossc/video_modes.c @@ -483,7 +483,7 @@ int get_vmode(vmode_t vmode_id, mode_data_t *vm_in, mode_data_t *vm_out, vm_proc { memset(vm_conf, 0, sizeof(vm_proc_config_t)); memset(vm_in, 0, sizeof(mode_data_t)); - memcpy(vm_out, &video_modes_plm[vmode_id], sizeof(mode_data_t)); + memcpy(vm_out, &video_modes_plm_default[vmode_id], sizeof(mode_data_t)); return 0; }