Use known data for burning disc initialization, helps to not block the interface.
This commit is contained in:
@@ -140,6 +140,10 @@ ecdb_print_drive_info(void)
|
||||
printf("Write HDDVD-R: %d, Write HDDVD-RW: %d\n",
|
||||
drive->write_hddvdr,
|
||||
drive->write_hddvdrw);
|
||||
printf("Status: %d, Type: %s, Capacity: %llu\n",
|
||||
drive->status,
|
||||
drive->type,
|
||||
drive->capacity);
|
||||
|
||||
j = drive->write_speeds[0];
|
||||
|
||||
@@ -151,27 +155,40 @@ ecdb_print_drive_info(void)
|
||||
}
|
||||
|
||||
int
|
||||
ecdb_aquire_drive(Ecdb_Project *proj, unsigned int idx)
|
||||
ecdb_aquire_drive(Ecdb_Project *proj)
|
||||
{
|
||||
Ecdb_Drive_Info *info;
|
||||
char adr[BURN_DRIVE_ADR_LEN];
|
||||
|
||||
info = eina_list_nth(em->drives, idx);
|
||||
if (burn_drive_convert_fs_adr(info->location, adr) <= 0)
|
||||
if (burn_drive_convert_fs_adr(proj->drive->location, adr) <= 0)
|
||||
{
|
||||
EINA_ERROR_PWARN("Error: Address doesn't provide cd burner!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (burn_drive_scan_and_grab(&info->tangible, adr, 1) > 0)
|
||||
if (burn_drive_scan_and_grab(&proj->drive->tangible, adr, 1) > 0)
|
||||
{
|
||||
proj->drive = info;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
info->tangible = NULL;
|
||||
proj->drive->tangible = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ecdb_set_project_drive(Ecdb_Project *proj, unsigned int idx)
|
||||
{
|
||||
Ecdb_Drive_Info *info;
|
||||
|
||||
info = eina_list_nth(em->drives, idx);
|
||||
if (!info)
|
||||
{
|
||||
EINA_ERROR_PERR("Drive index does not exist!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
proj->drive = info;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user