Fix magneto-optical initialization.
This commit is contained in:
@@ -1573,7 +1573,7 @@ load_mo(config_t* cfg, const char* cat)
|
|||||||
|
|
||||||
for (c = 0; c < MO_NUM; c++) {
|
for (c = 0; c < MO_NUM; c++) {
|
||||||
sprintf(temp, "mo_%02i_parameters", c + 1);
|
sprintf(temp, "mo_%02i_parameters", c + 1);
|
||||||
p = config_get_string(cat, temp, "0, none");
|
p = config_get_string(cat, temp, "none");
|
||||||
sscanf(p, "%s", s);
|
sscanf(p, "%s", s);
|
||||||
mo_drives[c].bus_type = mo_string_to_bus(s);
|
mo_drives[c].bus_type = mo_string_to_bus(s);
|
||||||
|
|
||||||
@@ -1650,7 +1650,7 @@ save_mo(const config_t* cfg, const char* cat)
|
|||||||
|
|
||||||
for (c = 0; c < MO_NUM; c++) {
|
for (c = 0; c < MO_NUM; c++) {
|
||||||
sprintf(temp, "mo_%02i_parameters", c + 1);
|
sprintf(temp, "mo_%02i_parameters", c + 1);
|
||||||
if (zip_drives[c].bus_type == 0) {
|
if (mo_drives[c].bus_type == 0) {
|
||||||
config_delete_var(cat, temp);
|
config_delete_var(cat, temp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
2
src/pc.c
2
src/pc.c
@@ -954,6 +954,7 @@ pc_reset_hard_init(void)
|
|||||||
scsi_card_init();
|
scsi_card_init();
|
||||||
|
|
||||||
cdrom_hard_reset();
|
cdrom_hard_reset();
|
||||||
|
zip_hard_reset();
|
||||||
mo_hard_reset();
|
mo_hard_reset();
|
||||||
scsi_disk_hard_reset();
|
scsi_disk_hard_reset();
|
||||||
|
|
||||||
@@ -1041,6 +1042,7 @@ pc_reload(const wchar_t *fn)
|
|||||||
|
|
||||||
cdrom_hard_reset();
|
cdrom_hard_reset();
|
||||||
|
|
||||||
|
zip_hard_reset();
|
||||||
mo_hard_reset();
|
mo_hard_reset();
|
||||||
|
|
||||||
scsi_disk_hard_reset();
|
scsi_disk_hard_reset();
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ settings_init(void)
|
|||||||
/* Other removable devices category */
|
/* Other removable devices category */
|
||||||
memcpy(temp_cdrom_drives, cdrom, CDROM_NUM * sizeof(cdrom_t));
|
memcpy(temp_cdrom_drives, cdrom, CDROM_NUM * sizeof(cdrom_t));
|
||||||
memcpy(temp_zip_drives, zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
memcpy(temp_zip_drives, zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
||||||
|
memcpy(temp_mo_drives, mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||||
|
|
||||||
temp_deviceconfig = 0;
|
temp_deviceconfig = 0;
|
||||||
}
|
}
|
||||||
@@ -184,6 +185,7 @@ settings_changed(void)
|
|||||||
/* Other removable devices category */
|
/* Other removable devices category */
|
||||||
i = i || memcmp(cdrom, temp_cdrom_drives, CDROM_NUM * sizeof(cdrom_t));
|
i = i || memcmp(cdrom, temp_cdrom_drives, CDROM_NUM * sizeof(cdrom_t));
|
||||||
i = i || memcmp(zip_drives, temp_zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
i = i || memcmp(zip_drives, temp_zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
||||||
|
i = i || memcmp(mo_drives, temp_mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||||
|
|
||||||
i = i || !!temp_deviceconfig;
|
i = i || !!temp_deviceconfig;
|
||||||
|
|
||||||
@@ -238,6 +240,7 @@ settings_save(void)
|
|||||||
/* Removable devices category */
|
/* Removable devices category */
|
||||||
memcpy(cdrom, temp_cdrom_drives, CDROM_NUM * sizeof(cdrom_t));
|
memcpy(cdrom, temp_cdrom_drives, CDROM_NUM * sizeof(cdrom_t));
|
||||||
memcpy(zip_drives, temp_zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
memcpy(zip_drives, temp_zip_drives, ZIP_NUM * sizeof(zip_drive_t));
|
||||||
|
memcpy(mo_drives, temp_mo_drives, MO_NUM * sizeof(mo_drive_t));
|
||||||
|
|
||||||
/* Mark configuration as changed. */
|
/* Mark configuration as changed. */
|
||||||
config_changed = 1;
|
config_changed = 1;
|
||||||
@@ -486,6 +489,7 @@ dlg_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
disk_track_init();
|
disk_track_init();
|
||||||
cdrom_track_init();
|
cdrom_track_init();
|
||||||
zip_track_init();
|
zip_track_init();
|
||||||
|
mo_track_init();
|
||||||
|
|
||||||
displayed_category = -1;
|
displayed_category = -1;
|
||||||
h = GetDlgItem(hdlg, IDC_SETTINGSCATLIST);
|
h = GetDlgItem(hdlg, IDC_SETTINGSCATLIST);
|
||||||
|
|||||||
Reference in New Issue
Block a user