fix SD profile import and use default 480p preset for TP

This commit is contained in:
marqs 2023-04-18 23:14:30 +03:00
parent c5f7483410
commit de1b441167
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}