mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
Safer CdStreamSetFilePointer
This commit is contained in:
parent
eb27f34143
commit
99503818dd
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue