diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index 3e383b5c96..276b829a5c 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -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, diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 25e881e6b9..3fb56d67ce 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -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,