Force CD-ROM TOC to be loaded on startup, booting from CD-ROM should be more reliable.
This commit is contained in:
parent
6fb56149f9
commit
048d332949
3 changed files with 26 additions and 1 deletions
|
|
@ -477,6 +477,26 @@ static uint32_t ioctl_size()
|
|||
return last_block;
|
||||
}
|
||||
|
||||
void ioctl_reset()
|
||||
{
|
||||
CDROM_TOC ltoc;
|
||||
int temp;
|
||||
long size;
|
||||
|
||||
if (!cdrom_drive)
|
||||
{
|
||||
tocvalid = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
ioctl_open(0);
|
||||
temp = DeviceIoControl(hIOCTL, IOCTL_CDROM_READ_TOC, NULL, 0, <oc, sizeof(ltoc), &size, NULL);
|
||||
ioctl_close();
|
||||
|
||||
toc = ltoc;
|
||||
tocvalid = 1;
|
||||
}
|
||||
|
||||
int ioctl_open(char d)
|
||||
{
|
||||
// char s[8];
|
||||
|
|
|
|||
Loading…
Reference in a new issue