mirror of https://github.com/libAthena/athena.git
Bug fix for Win7
This commit is contained in:
parent
ef7a9633c6
commit
0b3fd2b5af
|
@ -89,7 +89,8 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
|
|||
LARGE_INTEGER li;
|
||||
li.QuadPart = block * m_blockSize;
|
||||
SetFilePointerEx(m_fileHandle, li, nullptr, FILE_BEGIN);
|
||||
ReadFile(m_fileHandle, m_cacheData.get(), m_blockSize, nullptr, nullptr);
|
||||
DWORD readSz;
|
||||
ReadFile(m_fileHandle, m_cacheData.get(), m_blockSize, &readSz, nullptr);
|
||||
m_curBlock = (atInt32)block;
|
||||
}
|
||||
} else {
|
||||
|
@ -163,7 +164,8 @@ atUint64 FileReader::readUBytesToBuf(void* buf, atUint64 len) {
|
|||
LARGE_INTEGER li;
|
||||
li.QuadPart = block * m_blockSize;
|
||||
SetFilePointerEx(m_fileHandle, li, nullptr, FILE_BEGIN);
|
||||
ReadFile(m_fileHandle, m_cacheData.get(), m_blockSize, nullptr, nullptr);
|
||||
DWORD readSz;
|
||||
ReadFile(m_fileHandle, m_cacheData.get(), m_blockSize, &readSz, nullptr);
|
||||
m_curBlock = (atInt32)block;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue