task decompress: Add helper decompress check method

This commit is contained in:
Sebastien Ronsse 2016-05-05 09:42:56 +10:00
parent cc4b5dbf35
commit b8849a574c
2 changed files with 14 additions and 0 deletions

View File

@ -226,6 +226,18 @@ static bool rarch_task_decompress_finder(
return string_is_equal(dec->source_file, (const char*)user_data);
}
bool rarch_task_check_decompress(const char *source_file)
{
task_finder_data_t find_data;
/* Prepare find parameters */
find_data.func = rarch_task_decompress_finder;
find_data.userdata = (void *)source_file;
/* Return whether decompressing is in progress or not */
return task_queue_ctl(TASK_QUEUE_CTL_FIND, &find_data);
}
bool rarch_task_push_decompress(
const char *source_file,
const char *target_dir,

View File

@ -61,6 +61,8 @@ int detect_ps1_game(const char *track_path, char *game_id);
int detect_psp_game(const char *track_path, char *game_id);
bool rarch_task_check_decompress(const char *source_file);
bool rarch_task_push_decompress(
const char *source_file,
const char *target_dir,