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 committed 2016-03-16 17:55:27 +00:00
1 parent 2213564977
commit bfbc6de7b5
1 file changed
+2
@@ -297,6 +297,8 @@ s32 IOCtlSrc::Reopen()
if(device==INVALID_HANDLE_VALUE)
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;
DeviceIoControl(device,IOCTL_DVD_START_SESSION,NULL,0,&sessID,sizeof(DVD_SESSION_ID), &size, NULL);