Attempt to fix 64-bit seeks in DriveReader. Please test.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2363 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8741026ba0
commit
8276ca3b21
|
@ -114,8 +114,10 @@ namespace DiscIO
|
|||
u32 NotUsed;
|
||||
u8 * lpSector = new u8[m_blocksize];
|
||||
#ifdef _WIN32
|
||||
// TODO: Fix for 64bit block_num, SetFilePointer uses LONG
|
||||
SetFilePointer (hDisc, m_blocksize*block_num, NULL, FILE_BEGIN);
|
||||
u64 offset = m_blocksize * block_num;
|
||||
LONG off_low = (LONG)offset & 0xFFFFFFFF;
|
||||
LONG off_high = (LONG)(offset >> 32);
|
||||
SetFilePointer(hDisc, off_low, &off_high, FILE_BEGIN);
|
||||
if (!ReadFile(hDisc, lpSector, m_blocksize, (LPDWORD)&NotUsed, NULL))
|
||||
PanicAlert("DRE");
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue