mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 05:00:00 +00:00
Allow to handle larger files via 64bit variables
This commit is contained in:
parent
8614f68620
commit
f442793d20
|
@ -242,8 +242,15 @@ CdStreamRead(int32 channel, void *buffer, uint32 offset, uint32 size)
|
|||
else
|
||||
return STREAM_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
#ifdef BIG_IMG
|
||||
LARGE_INTEGER liDistanceToMove;
|
||||
liDistanceToMove.QuadPart = _GET_OFFSET(offset);
|
||||
liDistanceToMove.QuadPart *= CDSTREAM_SECTOR_SIZE;
|
||||
SetFilePointerEx(hImage, liDistanceToMove, nil, FILE_BEGIN);
|
||||
#else
|
||||
SetFilePointer(hImage, _GET_OFFSET(offset) * CDSTREAM_SECTOR_SIZE, nil, FILE_BEGIN);
|
||||
#endif
|
||||
|
||||
DWORD NumberOfBytesRead;
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ void *CdStreamThread(void *param)
|
|||
ASSERT(pChannel->hFile >= 0);
|
||||
ASSERT(pChannel->pBuffer != nil );
|
||||
|
||||
lseek(pChannel->hFile, pChannel->nSectorOffset * CDSTREAM_SECTOR_SIZE, SEEK_SET);
|
||||
lseek(pChannel->hFile, (size_t)pChannel->nSectorOffset * (size_t)CDSTREAM_SECTOR_SIZE, SEEK_SET);
|
||||
if (read(pChannel->hFile, pChannel->pBuffer, pChannel->nSectorsToRead * CDSTREAM_SECTOR_SIZE) == -1) {
|
||||
// pChannel->nSectorsToRead == 0 at this point means we wanted to flush channel
|
||||
// STREAM_WAITING is a little hack to make CStreaming not process this data
|
||||
|
|
|
@ -326,6 +326,8 @@ enum Config {
|
|||
#endif
|
||||
//#define PS2_AUDIO // changes audio paths for cutscenes and radio to PS2 paths, needs vbdec to support VB with MSS
|
||||
|
||||
// IMG
|
||||
#define BIG_IMG // allows to read larger img files
|
||||
|
||||
//#define SQUEEZE_PERFORMANCE
|
||||
#ifdef SQUEEZE_PERFORMANCE
|
||||
|
|
Loading…
Reference in a new issue