Floppies and CD-ROM's are now reloaded on new config load.

This commit is contained in:
OBattler
2017-06-08 20:58:32 +02:00
parent de9d14ede0
commit cdd855d258

View File

@@ -1794,6 +1794,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
{
HMENU hmenu;
RECT rect;
int i = 0;
switch (message)
{
@@ -2022,7 +2023,53 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
if (msgbox_reset_yn(ghwnd) == IDYES)
{
config_save(config_file_default);
for (i = 0; i < FDD_NUM; i++)
{
disc_close(i);
}
for (i = 0; i < CDROM_NUM; i++)
{
cdrom_drives[i].handler->exit(i);
if (cdrom_drives[i].host_drive == 200)
{
image_close(i);
}
else if ((cdrom_drives[i].host_drive >= 'A') && (cdrom_drives[i].host_drive <= 'Z'))
{
ioctl_close(i);
}
else
{
null_close(i);
}
}
loadconfig(wopenfilestring);
for (i = 0; i < CDROM_NUM; i++)
{
if (cdrom_drives[i].bus_type)
{
SCSIReset(cdrom_drives[i].scsi_device_id, cdrom_drives[i].scsi_device_lun);
}
if (cdrom_drives[i].host_drive == 200)
{
image_open(i, cdrom_image[i].image_path);
}
else if ((cdrom_drives[i].host_drive >= 'A') && (cdrom_drives[i].host_drive <= 'Z'))
{
ioctl_open(i, cdrom_drives[i].host_drive);
}
else
{
cdrom_null_open(i, cdrom_drives[i].host_drive);
}
}
disc_load(0, discfns[0]);
disc_load(1, discfns[1]);
disc_load(2, discfns[2]);
disc_load(3, discfns[3]);
/* pclog_w(L"NVR path: %s\n", nvr_path); */
mem_resize();
loadbios();