Update libretro-common

This commit is contained in:
twinaphex 2018-03-23 11:17:56 +01:00
parent e179a39491
commit 85d3be1245
6 changed files with 17 additions and 7 deletions

View File

@ -55,6 +55,8 @@ void chdstream_rewind(chdstream_t *stream);
int chdstream_seek(chdstream_t *stream, ssize_t offset, int whence);
ssize_t chdstream_get_size(chdstream_t *stream);
RETRO_END_DECLS
#endif

View File

@ -47,7 +47,7 @@ typedef struct RFILE RFILE;
void filestream_vfs_init(const struct retro_vfs_interface_info* vfs_info);
int64_t filestream_get_size(RFILE *stream);
ssize_t filestream_get_size(RFILE *stream);
/**
* filestream_open:

View File

@ -90,7 +90,7 @@ void intfstream_putc(intfstream_internal_t *intf, int c);
int intfstream_close(intfstream_internal_t *intf);
int64_t intfstream_get_size(intfstream_internal_t *intf);
ssize_t intfstream_get_size(intfstream_internal_t *intf);
int intfstream_flush(intfstream_internal_t *intf);

View File

@ -423,3 +423,8 @@ int chdstream_seek(chdstream_t *stream, ssize_t offset, int whence)
stream->offset = new_offset;
return 0;
}
ssize_t chdstream_get_size(chdstream_t *stream)
{
return stream->track_end;
}

View File

@ -111,9 +111,9 @@ bool filestream_exists(const char *path)
return true;
}
int64_t filestream_get_size(RFILE *stream)
ssize_t filestream_get_size(RFILE *stream)
{
int64_t output;
ssize_t output;
if (filestream_size_cb != NULL)
output = filestream_size_cb(stream->hfile);

View File

@ -57,7 +57,7 @@ struct intfstream_internal
#endif
};
int64_t intfstream_get_size(intfstream_internal_t *intf)
ssize_t intfstream_get_size(intfstream_internal_t *intf)
{
if (!intf)
return 0;
@ -69,8 +69,11 @@ int64_t intfstream_get_size(intfstream_internal_t *intf)
case INTFSTREAM_MEMORY:
return intf->memory.buf.size;
case INTFSTREAM_CHD:
/* TODO/FIXME - implement this */
break;
#ifdef HAVE_CHD
return chdstream_get_size(intf->chd.fp);
#else
break;
#endif
}
return 0;