mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
JS: Fix seeking to end on large files.
This commit is contained in:
parent
7f4107c287
commit
d37e62bfad
1 changed files with 6 additions and 2 deletions
|
@ -15,8 +15,12 @@ void CJsDiscImageDeviceStream::Seek(int64 position, Framework::STREAM_SEEK_DIREC
|
|||
m_position += position;
|
||||
break;
|
||||
case Framework::STREAM_SEEK_END:
|
||||
m_position = MAIN_THREAD_EM_ASM_INT({return Module.discImageDevice.getFileSize()});
|
||||
break;
|
||||
{
|
||||
uint32 positionLo = MAIN_THREAD_EM_ASM_INT({return Module.discImageDevice.getFileSize()});
|
||||
uint32 positionHi = MAIN_THREAD_EM_ASM_INT({return Module.discImageDevice.getFileSize() / 4294967296});
|
||||
m_position = static_cast<uint64>(positionLo) | (static_cast<uint64>(positionHi) << 32);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue