mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
(vfs_implementation.c) An unnecessary repeated conditional removed
This commit is contained in:
parent
7871e9fbc1
commit
8e6369ef33
@ -394,6 +394,7 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(
|
|||||||
|
|
||||||
stream->fp = fp;
|
stream->fp = fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Regarding setvbuf:
|
/* Regarding setvbuf:
|
||||||
*
|
*
|
||||||
* https://www.freebsd.org/cgi/man.cgi?query=setvbuf&apropos=0&sektion=0&manpath=FreeBSD+11.1-RELEASE&arch=default&format=html
|
* https://www.freebsd.org/cgi/man.cgi?query=setvbuf&apropos=0&sektion=0&manpath=FreeBSD+11.1-RELEASE&arch=default&format=html
|
||||||
@ -421,9 +422,6 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(
|
|||||||
stream->buf = (char*)memalign(0x40, bufsize);
|
stream->buf = (char*)memalign(0x40, bufsize);
|
||||||
if (stream->fp)
|
if (stream->fp)
|
||||||
setvbuf(stream->fp, stream->buf, _IOFBF, bufsize);
|
setvbuf(stream->fp, stream->buf, _IOFBF, bufsize);
|
||||||
}
|
|
||||||
if (stream->scheme != VFS_SCHEME_CDROM)
|
|
||||||
{
|
|
||||||
stream->buf = (char*)calloc(1, 0x4000);
|
stream->buf = (char*)calloc(1, 0x4000);
|
||||||
if (stream->fp)
|
if (stream->fp)
|
||||||
setvbuf(stream->fp, stream->buf, _IOFBF, 0x4000);
|
setvbuf(stream->fp, stream->buf, _IOFBF, 0x4000);
|
||||||
@ -463,10 +461,8 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(
|
|||||||
|
|
||||||
retro_vfs_file_seek_internal(stream, 0, SEEK_SET);
|
retro_vfs_file_seek_internal(stream, 0, SEEK_SET);
|
||||||
|
|
||||||
stream->mapped = (uint8_t*)mmap((void*)0,
|
if ((stream->mapped = (uint8_t*)mmap((void*)0,
|
||||||
stream->mapsize, PROT_READ, MAP_SHARED, stream->fd, 0);
|
stream->mapsize, PROT_READ, MAP_SHARED, stream->fd, 0)) == MAP_FAILED)
|
||||||
|
|
||||||
if (stream->mapped == MAP_FAILED)
|
|
||||||
stream->hints &= ~RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS;
|
stream->hints &= ~RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user