From bfbc6de7b5b3fc23e5d5157fbd92f16ba8e8ae51 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Tue, 15 Mar 2016 18:56:36 +0000 Subject: [PATCH] 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. --- plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp b/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp index b9a1742021..d505342ac0 100644 --- a/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp +++ b/plugins/cdvdGigaherz/src/Windows/IOCtlSrc.cpp @@ -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);