cdvdgigaherz: Fix Dual layer DVD layer 1 read

ReadFile reports that the DVD is reading from the end of file when
attempting to read any layer 1 sectors.

Use the FSCTL_ALLOW_EXTENDED_DASD_IO ioctl to prevent the file system
driver from carrying out boundary checks.
This commit is contained in:
Jonathan Li 2016-03-15 18:56:36 +00:00
parent 2213564977
commit bfbc6de7b5
1 changed files with 2 additions and 0 deletions

View File

@ -297,6 +297,8 @@ s32 IOCtlSrc::Reopen()
if(device==INVALID_HANDLE_VALUE) if(device==INVALID_HANDLE_VALUE)
return -1; return -1;
} }
// Dual layer DVDs cannot read from layer 1 without this ioctl
DeviceIoControl(device, FSCTL_ALLOW_EXTENDED_DASD_IO, nullptr, 0, nullptr, 0, &size, nullptr);
sessID=0; sessID=0;
DeviceIoControl(device,IOCTL_DVD_START_SESSION,NULL,0,&sessID,sizeof(DVD_SESSION_ID), &size, NULL); DeviceIoControl(device,IOCTL_DVD_START_SESSION,NULL,0,&sessID,sizeof(DVD_SESSION_ID), &size, NULL);