mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 01:28:57 +00:00
Second attempt at issue 3458. Fixes issue 3458.
Replaces all occurrences of ftell and fseek with ftello and fseeko, respectively. This matters on non-win32 where only these names are altered by the _FILE_OFFSET_BITS define. Win32 still just maps the funcs to ftelli64/fseeki64. Also add some File::GetSize I had skipped in my last commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6515 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
97e3a3ea6f
commit
e70e623624
18 changed files with 54 additions and 60 deletions
|
@ -111,7 +111,7 @@ void DriveReader::GetBlock(u64 block_num, u8 *out_ptr)
|
|||
if (!ReadFile(hDisc, lpSector, m_blocksize, (LPDWORD)&NotUsed, NULL))
|
||||
PanicAlert("Disc Read Error");
|
||||
#else
|
||||
fseek(file_, m_blocksize*block_num, SEEK_SET);
|
||||
fseeko(file_, m_blocksize*block_num, SEEK_SET);
|
||||
fread(lpSector, 1, m_blocksize, file_);
|
||||
#endif
|
||||
memcpy(out_ptr, lpSector, m_blocksize);
|
||||
|
@ -132,7 +132,7 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *o
|
|||
return false;
|
||||
}
|
||||
#else
|
||||
fseek(file_, m_blocksize*block_num, SEEK_SET);
|
||||
fseeko(file_, m_blocksize*block_num, SEEK_SET);
|
||||
if(fread(out_ptr, 1, m_blocksize * num_blocks, file_) != m_blocksize * num_blocks)
|
||||
return false;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue