Safer CdStreamSetFilePointer

This commit is contained in:
Silent 2017-09-12 18:04:42 +02:00
parent eb27f34143
commit 99503818dd

View file

@ -1034,11 +1034,13 @@ RwBool GTARtAnimInterpolatorSetCurrentAnim(RtAnimInterpolator* animI, RtAnimAnim
return TRUE; return TRUE;
} }
void __stdcall CdStreamSetFilePointer( HANDLE hFile, uint32_t distanceToMove, void*, DWORD dwMoveMethod ) DWORD WINAPI CdStreamSetFilePointer( HANDLE hFile, uint32_t distanceToMove, PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod )
{ {
assert( lpDistanceToMoveHigh == nullptr );
LARGE_INTEGER li; LARGE_INTEGER li;
li.QuadPart = int64_t(distanceToMove) << 11; li.QuadPart = int64_t(distanceToMove) << 11;
SetFilePointerEx( hFile, li, nullptr, dwMoveMethod ); return SetFilePointer( hFile, li.LowPart, &li.HighPart, dwMoveMethod );
} }
static auto* const pCdStreamSetFilePointer = CdStreamSetFilePointer; static auto* const pCdStreamSetFilePointer = CdStreamSetFilePointer;