mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Sync libretro-common
This commit is contained in:
parent
8c63ea2515
commit
0aff65e77b
@ -340,25 +340,15 @@ int64_t retro_vfs_file_read_cdrom(libretro_vfs_implementation_file *stream,
|
|||||||
|
|
||||||
if (string_is_equal_noncase(ext, "cue"))
|
if (string_is_equal_noncase(ext, "cue"))
|
||||||
{
|
{
|
||||||
if ((int64_t)len < (int64_t)stream->cdrom.cue_len - stream->cdrom.byte_pos)
|
if ((int64_t)len >= (int64_t)stream->cdrom.cue_len - stream->cdrom.byte_pos) len = stream->cdrom.cue_len - stream->cdrom.byte_pos - 1;
|
||||||
{
|
|
||||||
#ifdef CDROM_DEBUG
|
#ifdef CDROM_DEBUG
|
||||||
printf("[CDROM] Read: Reading %" PRIu64 " bytes from cuesheet starting at %" PRIu64 "...\n", len, stream->cdrom.byte_pos);
|
printf("[CDROM] Read: Reading %" PRIu64 " bytes from cuesheet starting at %" PRIu64 "...\n", len, stream->cdrom.byte_pos);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
memcpy(s, stream->cdrom.cue_buf + stream->cdrom.byte_pos, len);
|
memcpy(s, stream->cdrom.cue_buf + stream->cdrom.byte_pos, len);
|
||||||
stream->cdrom.byte_pos += len;
|
stream->cdrom.byte_pos += len;
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef CDROM_DEBUG
|
|
||||||
printf("[CDROM] Read: Reading %" PRIu64 " bytes from cuesheet starting at %" PRIu64 " failed.\n", len, stream->cdrom.byte_pos);
|
|
||||||
fflush(stdout);
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (string_is_equal_noncase(ext, "bin"))
|
else if (string_is_equal_noncase(ext, "bin"))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user