mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-13 11:52:08 +00:00
Add intfstream_tell
This commit is contained in:
parent
0da67ad4f9
commit
a8144abbce
@ -72,6 +72,8 @@ int intfstream_seek(intfstream_internal_t *intf,
|
|||||||
|
|
||||||
void intfstream_rewind(intfstream_internal_t *intf);
|
void intfstream_rewind(intfstream_internal_t *intf);
|
||||||
|
|
||||||
|
size_t intfstream_tell(intfstream_internal_t *intf);
|
||||||
|
|
||||||
int intfstream_close(intfstream_internal_t *intf);
|
int intfstream_close(intfstream_internal_t *intf);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -222,6 +222,22 @@ int intfstream_getc(intfstream_internal_t *intf)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t intfstream_tell(intfstream_internal_t *intf)
|
||||||
|
{
|
||||||
|
if (!intf)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
switch (intf->type)
|
||||||
|
{
|
||||||
|
case INTFSTREAM_FILE:
|
||||||
|
return filestream_tell(intf->file.fp);
|
||||||
|
case INTFSTREAM_MEMORY:
|
||||||
|
return memstream_pos(intf->memory.fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
void intfstream_rewind(intfstream_internal_t *intf)
|
void intfstream_rewind(intfstream_internal_t *intf)
|
||||||
{
|
{
|
||||||
switch (intf->type)
|
switch (intf->type)
|
||||||
|
Loading…
Reference in New Issue
Block a user