From db8fe73917579cbc9de1e44d02c5fe4d0cde9cbb Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 15 Dec 2017 06:39:13 +0100 Subject: [PATCH] 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. --- src/config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index e4cae081b..b0764f9b3 100644 --- a/src/config.c +++ b/src/config.c @@ -8,7 +8,7 @@ * * Configuration file handler. * - * Version: @(#)config.c 1.0.34 2017/12/09 + * Version: @(#)config.c 1.0.35 2017/12/15 * * Authors: Sarah Walker, * Miran Grca, @@ -1025,6 +1025,9 @@ load_removable_devices(void) sscanf("0, none", "%u, %s", &cdrom_drives[c].sound_on, s); 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); if ((cdrom_drives[c].bus_type == CDROM_BUS_ATAPI_PIO_ONLY) || (cdrom_drives[c].bus_type == CDROM_BUS_ATAPI_PIO_AND_DMA)) {