IOCTL CD-ROM code now returns 'not ready' when TOC can not be read. Should fix crashes in Windows 9x when CD drive empty or disc changed.
This commit is contained in:
parent
3e1600ae9e
commit
78a36b2e9d
1 changed files with 2 additions and 0 deletions
|
|
@ -219,6 +219,8 @@ static int ioctl_ready(void)
|
|||
ioctl_open(0);
|
||||
temp=DeviceIoControl(hIOCTL,IOCTL_CDROM_READ_TOC, NULL,0,<oc,sizeof(ltoc),&size,NULL);
|
||||
ioctl_close();
|
||||
if (!temp)
|
||||
return 0;
|
||||
if ((ltoc.TrackData[ltoc.LastTrack].Address[1] != toc.TrackData[toc.LastTrack].Address[1]) ||
|
||||
(ltoc.TrackData[ltoc.LastTrack].Address[2] != toc.TrackData[toc.LastTrack].Address[2]) ||
|
||||
(ltoc.TrackData[ltoc.LastTrack].Address[3] != toc.TrackData[toc.LastTrack].Address[3]) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue