The configuration loading code now initializes the default IDE channel and SCSI ID for every CD-ROM drive to sane values before attempting to read them from the configuration file, fixes the default values the devices get in the Settings dialog.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Configuration file handler.
|
* Configuration file handler.
|
||||||
*
|
*
|
||||||
* Version: @(#)config.c 1.0.34 2017/12/09
|
* Version: @(#)config.c 1.0.35 2017/12/15
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker,
|
* Authors: Sarah Walker,
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -1025,6 +1025,9 @@ load_removable_devices(void)
|
|||||||
sscanf("0, none", "%u, %s", &cdrom_drives[c].sound_on, s);
|
sscanf("0, none", "%u, %s", &cdrom_drives[c].sound_on, s);
|
||||||
cdrom_drives[c].bus_type = hdd_string_to_bus(s, 1);
|
cdrom_drives[c].bus_type = hdd_string_to_bus(s, 1);
|
||||||
|
|
||||||
|
/* Default values, needed for proper operation of the Settings dialog. */
|
||||||
|
cdrom_drives[c].ide_channel = cdrom_drives[c].scsi_device_id = c + 2;
|
||||||
|
|
||||||
sprintf(temp, "cdrom_%02i_ide_channel", c+1);
|
sprintf(temp, "cdrom_%02i_ide_channel", c+1);
|
||||||
if ((cdrom_drives[c].bus_type == CDROM_BUS_ATAPI_PIO_ONLY) ||
|
if ((cdrom_drives[c].bus_type == CDROM_BUS_ATAPI_PIO_ONLY) ||
|
||||||
(cdrom_drives[c].bus_type == CDROM_BUS_ATAPI_PIO_AND_DMA)) {
|
(cdrom_drives[c].bus_type == CDROM_BUS_ATAPI_PIO_AND_DMA)) {
|
||||||
|
Reference in New Issue
Block a user