mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix the Fseek() and Fseektell() implementation when using the libretro VFS
This commit is contained in:
1 file changed
+2
-2
@@ -1231,7 +1231,7 @@ int Fseek(FILE *file, int64_t offset, int whence) {
|
||||
whence = RETRO_VFS_SEEK_POSITION_END;
|
||||
break;
|
||||
}
|
||||
return filestream_seek(file, offset, whence) == -1 ? -1 : 0;
|
||||
return filestream_seek(file, offset, whence) != 0 ? -1 : 0;
|
||||
#elif defined(_WIN32)
|
||||
return _fseeki64(file, offset, whence);
|
||||
#elif defined(__ANDROID__) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
|
||||
@@ -1254,7 +1254,7 @@ int64_t Fseektell(FILE *file, int64_t offset, int whence) {
|
||||
whence = RETRO_VFS_SEEK_POSITION_END;
|
||||
break;
|
||||
}
|
||||
return filestream_seek(file, offset, whence) == -1 ? -1 : filestream_tell(file);
|
||||
return filestream_seek(file, offset, whence) != 0 ? -1 : filestream_tell(file);
|
||||
#elif defined(_WIN32)
|
||||
return _fseeki64(file, offset, whence) != 0 ? -1 : _ftelli64(file);
|
||||
#elif defined(__ANDROID__) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS < 64)
|
||||
|
||||
Reference in new issue
Block a user