mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
commit
4d4f56ec9a
@ -617,7 +617,10 @@ int zlib_parse_file_iterate(void *data, bool *returnerr, const char *file,
|
||||
*returnerr = false;
|
||||
case ZLIB_TRANSFER_DEINIT:
|
||||
if (state->handle)
|
||||
{
|
||||
state->backend->free(state->handle);
|
||||
state->handle = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -628,6 +631,16 @@ int zlib_parse_file_iterate(void *data, bool *returnerr, const char *file,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zlib_parse_file_iterate_stop(void *data)
|
||||
{
|
||||
zlib_transfer_t *state = (zlib_transfer_t*)data;
|
||||
if (!state || !state->handle)
|
||||
return;
|
||||
|
||||
state->type = ZLIB_TRANSFER_DEINIT;
|
||||
zlib_parse_file_iterate(data, NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* zlib_parse_file:
|
||||
* @file : filename path of archive
|
||||
|
@ -83,6 +83,8 @@ int zlib_parse_file_iterate(void *data, bool *returnerr,
|
||||
const char *file,
|
||||
const char *valid_exts, zlib_file_cb file_cb, void *userdata);
|
||||
|
||||
void zlib_parse_file_iterate_stop(void *data);
|
||||
|
||||
/**
|
||||
* zlib_extract_first_content_file:
|
||||
* @zip_path : filename path to ZIP archive.
|
||||
|
@ -55,3 +55,4 @@ HAVE_7ZIP=yes # Compile in 7z support
|
||||
HAVE_PRESERVE_DYLIB=no # Disable dlclose() for Valgrind support
|
||||
HAVE_PARPORT=auto # Parallel port joypad support
|
||||
HAVE_IMAGEVIEWER=yes # Built-in image viewer support.
|
||||
HAVE_MMAP=auto # MMAP support
|
||||
|
@ -286,6 +286,9 @@ static int database_info_iterate_playlist_zip(
|
||||
&returnerr, name, NULL, zlib_compare_crc32,
|
||||
(void*)db_state) != 0)
|
||||
return 0;
|
||||
|
||||
if (db_state->crc)
|
||||
zlib_parse_file_iterate_stop(&db->state);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user