diff --git a/tasks/task_database.c b/tasks/task_database.c index 88eb8bc7cb..73919d5563 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -62,6 +62,15 @@ typedef struct db_handle char content_database_path[4096]; } db_handle_t; +int find_first_data_track(const char* cue_path, + int32_t* offset, char* track_path, size_t max_len); + +int detect_system(const char* track_path, const char** system_name); + +int detect_ps1_game(const char *track_path, char *game_id); + +int detect_psp_game(const char *track_path, char *game_id); + static void database_info_set_type(database_info_handle_t *handle, enum database_type type) { if (!handle) diff --git a/tasks/task_file_transfer.c b/tasks/task_file_transfer.c index fe8a4abbef..bb0a6bf52c 100644 --- a/tasks/task_file_transfer.c +++ b/tasks/task_file_transfer.c @@ -24,6 +24,8 @@ #include "tasks_internal.h" #include "../verbosity.h" +bool task_image_load_handler(retro_task_t *task); + static int task_file_transfer_iterate_transfer(nbio_handle_t *nbio) { size_t i; diff --git a/tasks/task_image.c b/tasks/task_image.c index 02d91095ac..b42dae2494 100644 --- a/tasks/task_image.c +++ b/tasks/task_image.c @@ -195,6 +195,25 @@ static void task_image_load_free_internal(struct nbio_image_handle *image) image->cb = NULL; } +static void task_image_load_free(retro_task_t *task) +{ + nbio_handle_t *nbio = task ? (nbio_handle_t*)task->state : NULL; + + if (nbio) + { + struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data; + + if (image) + task_image_load_free_internal(image); + if (nbio->data) + free(nbio->data); + nbio_free(nbio->handle); + nbio->data = NULL; + nbio->handle = NULL; + free(nbio); + } +} + static int cb_nbio_generic(nbio_handle_t *nbio, size_t *len) { struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data; @@ -390,22 +409,3 @@ error_msg: return false; } - -void task_image_load_free(retro_task_t *task) -{ - nbio_handle_t *nbio = task ? (nbio_handle_t*)task->state : NULL; - - if (nbio) - { - struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data; - - if (image) - task_image_load_free_internal(image); - if (nbio->data) - free(nbio->data); - nbio_free(nbio->handle); - nbio->data = NULL; - nbio->handle = NULL; - free(nbio); - } -} diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 9c03d31f78..ebf7e30544 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -128,19 +128,8 @@ bool task_push_overlay_load_default( retro_task_callback_t cb, void *user_data); #endif -int find_first_data_track(const char* cue_path, - int32_t* offset, char* track_path, size_t max_len); - -int detect_system(const char* track_path, const char** system_name); - -int detect_ps1_game(const char *track_path, char *game_id); - -int detect_psp_game(const char *track_path, char *game_id); - bool task_check_decompress(const char *source_file); -bool task_image_load_handler(retro_task_t *task); - bool task_push_decompress( const char *source_file, const char *target_dir, @@ -213,8 +202,6 @@ bool task_push_load_content_with_core_from_menu( void *user_data); #endif -void task_image_load_free(retro_task_t *task); - void task_file_load_handler(retro_task_t *task); bool take_screenshot(const char *path, bool silence);