Fixed CD-ROM initialisation broken by config changes.
This commit is contained in:
parent
c518e3d137
commit
85e7829244
2 changed files with 7 additions and 0 deletions
|
|
@ -737,14 +737,20 @@ void ioctl_reset()
|
|||
|
||||
void ioctl_set_drive(char d)
|
||||
{
|
||||
ioctl_close();
|
||||
|
||||
sprintf(ioctl_path, "\\\\.\\%c:", d);
|
||||
pclog("Path is %s\n", ioctl_path);
|
||||
tocvalid = 0;
|
||||
atapi = &ioctl_atapi;
|
||||
|
||||
ioctl_open(d);
|
||||
}
|
||||
|
||||
int ioctl_open(char d)
|
||||
{
|
||||
if (hIOCTL)
|
||||
ioctl_close();
|
||||
hIOCTL = CreateFile(ioctl_path,GENERIC_READ | GENERIC_WRITE,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL);
|
||||
if (!hIOCTL)
|
||||
|
|
|
|||
1
src/pc.c
1
src/pc.c
|
|
@ -411,6 +411,7 @@ void resetpchard()
|
|||
}
|
||||
else
|
||||
{
|
||||
ioctl_set_drive(cdrom_drive);
|
||||
ioctl_reset();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue