mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Add intfstream_close
This commit is contained in:
parent
99a9769014
commit
0da67ad4f9
@ -72,4 +72,6 @@ int intfstream_seek(intfstream_internal_t *intf,
|
||||
|
||||
void intfstream_rewind(intfstream_internal_t *intf);
|
||||
|
||||
int intfstream_close(intfstream_internal_t *intf);
|
||||
|
||||
#endif
|
||||
|
@ -90,6 +90,23 @@ bool intfstream_open(intfstream_internal_t *intf, const char *path,
|
||||
return true;
|
||||
}
|
||||
|
||||
int intfstream_close(intfstream_internal_t *intf)
|
||||
{
|
||||
if (!intf)
|
||||
return -1;
|
||||
|
||||
switch (intf->type)
|
||||
{
|
||||
case INTFSTREAM_FILE:
|
||||
return filestream_close(intf->file.fp);
|
||||
case INTFSTREAM_MEMORY:
|
||||
memstream_close(intf->memory.fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void *intfstream_init(intfstream_info_t *info)
|
||||
{
|
||||
intfstream_internal_t *intf = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user