1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Rename rarch_task_* to task_*

This commit is contained in:
twinaphex 2016-05-27 18:14:47 +02:00
parent c00f8c5dd6
commit 7d26034ebe
23 changed files with 102 additions and 102 deletions

View File

@ -1460,7 +1460,7 @@ static void cheevos_unlocked(void *task_data, void *user_data, const char *error
RARCH_ERR("CHEEVOS error awarding achievement %u, retrying\n", cheevo->id);
cheevos_make_unlock_url(cheevo, url, sizeof(url));
rarch_task_push_http_transfer(url, true, NULL, cheevos_unlocked, cheevo);
task_push_http_transfer(url, true, NULL, cheevos_unlocked, cheevo);
}
}
@ -1483,7 +1483,7 @@ static void cheevos_test_cheevo_set(const cheevoset_t *set)
runloop_msg_queue_push(cheevo->description, 0, 5 * 60, false);
cheevos_make_unlock_url(cheevo, url, sizeof(url));
rarch_task_push_http_transfer(url, true, NULL, cheevos_unlocked, cheevo);
task_push_http_transfer(url, true, NULL, cheevos_unlocked, cheevo);
}
}
}
@ -1637,7 +1637,7 @@ static void cheevos_playing(void *task_data, void *user_data, const char *error)
RARCH_ERR("CHEEVOS error posting playing game %u activity, will retry\n", game_id);
cheevos_make_playing_url(game_id, url, sizeof(url));
rarch_task_push_http_transfer(url, true, NULL, cheevos_playing, (void*)(uintptr_t)game_id);
task_push_http_transfer(url, true, NULL, cheevos_playing, (void*)(uintptr_t)game_id);
}
}
@ -2169,7 +2169,7 @@ bool cheevos_load(const void *data)
cheevos_locals.loaded = 1;
cheevos_make_playing_url(game_id, url, sizeof(url));
rarch_task_push_http_transfer(url, true, NULL, cheevos_playing, (void*)(uintptr_t)game_id);
task_push_http_transfer(url, true, NULL, cheevos_playing, (void*)(uintptr_t)game_id);
return true;
}

View File

@ -1726,7 +1726,7 @@ bool command_event(enum event_command cmd, void *data)
command_event(CMD_EVENT_AUTOSAVE_STATE, NULL);
command_event(CMD_EVENT_DISABLE_OVERRIDES, NULL);
if (!rarch_task_push_content_load_default(
if (!task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_DUMMY,
@ -1868,7 +1868,7 @@ bool command_event(enum event_command cmd, void *data)
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
#ifdef HAVE_OVERLAY
if (settings->input.overlay_enable)
rarch_task_push_overlay_load_default(input_overlay_loaded, NULL);
task_push_overlay_load_default(input_overlay_loaded, NULL);
#endif
break;
case CMD_EVENT_OVERLAY_NEXT:

View File

@ -3000,7 +3000,7 @@ bool config_replace(char *path)
*settings->path.libretro = '\0'; /* Load core in new config. */
if (!rarch_task_push_content_load_default(
if (!task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_DUMMY,

View File

@ -102,7 +102,7 @@ int rarch_main(int argc, char *argv[], void *data)
info.args = args;
info.environ_get = frontend_driver_environment_get_ptr();
if (!rarch_task_push_content_load_default(
if (!task_push_content_load_default(
NULL,
NULL,
&info,

View File

@ -509,7 +509,7 @@ static int file_load_with_detect_core_wrapper(size_t idx, size_t entry_idx,
case -1:
command_event(CMD_EVENT_LOAD_CORE, NULL);
rarch_task_push_content_load_default(NULL, NULL,
task_push_content_load_default(NULL, NULL,
&content_info, CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU,
NULL, NULL);
@ -557,7 +557,7 @@ static int action_ok_file_load_detect_core(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
content_ctx_info_t content_info = {0};
rarch_task_push_content_load_default(path, detect_content_path,
task_push_content_load_default(path, detect_content_path,
&content_info, CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU,
NULL, NULL);
@ -756,7 +756,7 @@ static int generic_action_ok(const char *path,
strlcpy(settings->path.menu_wallpaper,
action_path, sizeof(settings->path.menu_wallpaper));
rarch_task_push_image_load(action_path, "cb_menu_wallpaper",
task_push_image_load(action_path, "cb_menu_wallpaper",
menu_display_handle_wallpaper_upload, NULL);
}
break;
@ -1137,7 +1137,7 @@ static int action_ok_core_load_deferred(const char *path,
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
return menu_cbs_exit();
rarch_task_push_content_load_default(path, menu->deferred_path,
task_push_content_load_default(path, menu->deferred_path,
&content_info,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU,
@ -1170,7 +1170,7 @@ static int generic_action_ok_file_load(const char *path,
switch (id)
{
case ACTION_OK_FFMPEG:
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL, new_path,
&content_info,
action_type,
@ -1178,7 +1178,7 @@ static int generic_action_ok_file_load(const char *path,
NULL, NULL);
break;
case ACTION_OK_IMAGEVIEWER:
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL, new_path,
&content_info,
action_type,
@ -1250,7 +1250,7 @@ static int action_ok_file_load(const char *path,
fill_pathname_join(full_path_new, menu_path_new, path,
sizeof(full_path_new));
rarch_task_push_content_load_default(NULL,
task_push_content_load_default(NULL,
full_path_new,
&content_info,
CORE_TYPE_PLAIN,
@ -1412,7 +1412,7 @@ static void cb_generic_download(void *task_data,
if (string_is_equal_noncase(file_ext, "zip"))
{
if (rarch_task_check_decompress(output_path))
if (task_check_decompress(output_path))
{
err = "Decompression already in progress.";
goto finish;
@ -1432,7 +1432,7 @@ static void cb_generic_download(void *task_data,
if (string_is_equal_noncase(file_ext, "zip"))
{
if (!rarch_task_push_decompress(output_path, dir_path, NULL, NULL, NULL,
if (!task_push_decompress(output_path, dir_path, NULL, NULL, NULL,
cb_decompressed, (void*)(uintptr_t)transf->type_hash))
{
err = "Decompression failed.";
@ -1515,7 +1515,7 @@ static int action_ok_download_generic(const char *path,
transf->type_hash = menu_hash_calculate(type_msg);
strlcpy(transf->path, path, sizeof(transf->path));
rarch_task_push_http_transfer(s3, false, type_msg, cb_generic_download, transf);
task_push_http_transfer(s3, false, type_msg, cb_generic_download, transf);
#endif
return 0;
}
@ -1777,7 +1777,7 @@ static int generic_action_ok_network(const char *path,
#endif
}
rarch_task_push_http_transfer(url_path, false, url_label, callback, NULL);
task_push_http_transfer(url_path, false, url_label, callback, NULL);
return generic_action_ok_displaylist_push(path,
label, type, idx, entry_idx, type_id2);
@ -2059,7 +2059,7 @@ static int action_ok_start_core(const char *path,
if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL))
{
content_ctx_info_t content_info = {0};
rarch_task_push_content_load_default(NULL, NULL,
task_push_content_load_default(NULL, NULL,
&content_info, CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU,
NULL, NULL);
@ -2142,7 +2142,7 @@ static int action_ok_load_archive(const char *path,
sizeof(detect_content_path));
command_event(CMD_EVENT_LOAD_CORE, NULL);
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL, detect_content_path,
&content_info, CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU,
@ -2190,7 +2190,7 @@ static int action_ok_load_archive_detect_core(const char *path,
{
case -1:
command_event(CMD_EVENT_LOAD_CORE, NULL);
rarch_task_push_content_load_default(NULL, NULL,
task_push_content_load_default(NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,
CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU,

View File

@ -55,7 +55,7 @@ int action_scan_file(const char *path,
fill_pathname_join(fullpath, menu_path, path, sizeof(fullpath));
rarch_task_push_dbscan(fullpath, false, handle_dbscan_finished);
task_push_dbscan(fullpath, false, handle_dbscan_finished);
return 0;
}
@ -78,7 +78,7 @@ int action_scan_directory(const char *path,
if (path)
fill_pathname_join(fullpath, fullpath, path, sizeof(fullpath));
rarch_task_push_dbscan(fullpath, true, handle_dbscan_finished);
task_push_dbscan(fullpath, true, handle_dbscan_finished);
return 0;
}

View File

@ -1250,7 +1250,7 @@ static void mui_context_reset(void *data)
menu_display_allocate_white_texture();
mui_context_reset_textures(mui, iconpath);
rarch_task_push_image_load(settings->path.menu_wallpaper, "cb_menu_wallpaper",
task_push_image_load(settings->path.menu_wallpaper, "cb_menu_wallpaper",
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -367,7 +367,7 @@ static void nk_menu_context_reset(void *data)
wimp_context_bg_destroy(nk);
nk_menu_context_reset_textures(nk, iconpath);
rarch_task_push_image_load(settings->path.menu_wallpaper, "cb_menu_wallpaper",
task_push_image_load(settings->path.menu_wallpaper, "cb_menu_wallpaper",
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -735,7 +735,7 @@ static void xmb_update_thumbnail_image(void *data)
return;
if (path_file_exists(xmb->thumbnail_file_path))
rarch_task_push_image_load(xmb->thumbnail_file_path, "cb_menu_thumbnail",
task_push_image_load(xmb->thumbnail_file_path, "cb_menu_thumbnail",
menu_display_handle_thumbnail_upload, NULL);
else if (xmb->depth == 1)
xmb->thumbnail = 0;
@ -1071,7 +1071,7 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
{
if(path_file_exists(path))
{
rarch_task_push_image_load(path, "cb_menu_wallpaper",
task_push_image_load(path, "cb_menu_wallpaper",
menu_display_handle_wallpaper_upload, NULL);
strlcpy(xmb->background_file_path,
path, sizeof(xmb->background_file_path));
@ -2795,7 +2795,7 @@ static void xmb_context_reset_background(const char *iconpath)
strlcpy(path, settings->path.menu_wallpaper, sizeof(path));
if (path_file_exists(path))
rarch_task_push_image_load(path, "cb_menu_wallpaper",
task_push_image_load(path, "cb_menu_wallpaper",
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -792,7 +792,7 @@ static int zarch_zui_load_content(zui_t *zui, unsigned i)
{
content_ctx_info_t content_info = {0};
rarch_task_push_content_load_default(zui->pick_cores[i].path,
task_push_content_load_default(zui->pick_cores[i].path,
zui->pick_content,
&content_info,
CORE_TYPE_PLAIN,
@ -1028,7 +1028,7 @@ static void *zarch_init(void **userdata)
zui->font_size = 28;
if (!string_is_empty(settings->path.menu_wallpaper))
rarch_task_push_image_load(settings->path.menu_wallpaper,
task_push_image_load(settings->path.menu_wallpaper,
"cb_menu_wallpaper",
menu_display_handle_wallpaper_upload, NULL);
@ -1113,7 +1113,7 @@ static void zarch_context_reset(void *data)
zarch_context_bg_destroy(zui);
rarch_task_push_image_load(settings->path.menu_wallpaper,
task_push_image_load(settings->path.menu_wallpaper,
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload, NULL);
menu_display_allocate_white_texture();

View File

@ -94,7 +94,7 @@ static bool menu_content_load_from_playlist(menu_content_ctx_playlist_info_t *in
goto error;
}
if (rarch_task_push_content_load_default(
if (task_push_content_load_default(
core_path,
path,
&content_info,

View File

@ -176,7 +176,7 @@ static bool menu_init(menu_handle_t *menu_data)
menu_data->help_screen_type = MENU_HELP_EXTRACT;
menu_data->push_help_screen = true;
#ifdef HAVE_ZLIB
rarch_task_push_decompress(settings->path.bundle_assets_src,
task_push_decompress(settings->path.bundle_assets_src,
settings->path.bundle_assets_dst,
NULL, settings->path.bundle_assets_dst_subdir,
NULL, bundle_decompressed, NULL);

View File

@ -1243,7 +1243,7 @@ static void runloop_iterate_linefeed_overlay(settings_t *settings)
static int runloop_iterate_time_to_exit_load_dummy(void)
{
content_ctx_info_t content_info = {0};
if (!rarch_task_push_content_load_default(
if (!task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_DUMMY,

View File

@ -1694,7 +1694,7 @@ static bool command_event_cmd_exec(void *data)
return true;
}
bool rarch_task_push_content_load_default(
bool task_push_content_load_default(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,

View File

@ -600,7 +600,7 @@ task_finished:
free(db);
}
bool rarch_task_push_dbscan(const char *fullpath,
bool task_push_dbscan(const char *fullpath,
bool directory, retro_task_callback_t cb)
{
retro_task_t *t = (retro_task_t*)calloc(1, sizeof(*t));

View File

@ -226,7 +226,7 @@ static bool task_decompress_finder(
return string_is_equal(dec->source_file, (const char*)user_data);
}
bool rarch_task_check_decompress(const char *source_file)
bool task_check_decompress(const char *source_file)
{
task_finder_data_t find_data;
@ -238,7 +238,7 @@ bool rarch_task_check_decompress(const char *source_file)
return task_queue_ctl(TASK_QUEUE_CTL_FIND, &find_data);
}
bool rarch_task_push_decompress(
bool task_push_decompress(
const char *source_file,
const char *target_dir,
const char *target_file,
@ -274,7 +274,7 @@ bool rarch_task_push_decompress(
if (!valid_ext || !valid_ext[0])
valid_ext = NULL;
if (rarch_task_check_decompress(source_file))
if (task_check_decompress(source_file))
{
RARCH_LOG("[decompress] File '%s' already being decompressed.\n",
source_file);

View File

@ -62,7 +62,7 @@ static int task_file_transfer_iterate_parse(nbio_handle_t *nbio)
return 0;
}
void rarch_task_file_load_handler(retro_task_t *task)
void task_file_load_handler(retro_task_t *task)
{
nbio_handle_t *nbio = (nbio_handle_t*)task->state;
@ -89,7 +89,7 @@ void rarch_task_file_load_handler(retro_task_t *task)
case IMAGE_TYPE_JPEG:
case IMAGE_TYPE_TGA:
case IMAGE_TYPE_BMP:
if (!rarch_task_image_load_handler(task))
if (!task_image_load_handler(task))
task->finished = true;
break;
case 0:

View File

@ -128,7 +128,7 @@ static int task_http_iterate_transfer(retro_task_t *task)
return 0;
}
static void rarch_task_http_transfer_handler(retro_task_t *task)
static void task_http_transfer_handler(retro_task_t *task)
{
http_transfer_data_t *data = NULL;
http_handle_t *http = (http_handle_t*)task->state;
@ -200,11 +200,11 @@ task_finished:
free(http);
}
static bool rarch_task_http_finder(retro_task_t *task, void *user_data)
static bool task_http_finder(retro_task_t *task, void *user_data)
{
http_handle_t *http = NULL;
if (!task || (task->handler != rarch_task_http_transfer_handler))
if (!task || (task->handler != task_http_transfer_handler))
return false;
if (!user_data)
@ -217,7 +217,7 @@ static bool rarch_task_http_finder(retro_task_t *task, void *user_data)
return string_is_equal(http->connection.url, (const char*)user_data);
}
static bool rarch_task_http_retriever(retro_task_t *task, void *data)
static bool task_http_retriever(retro_task_t *task, void *data)
{
http_transfer_info_t *info = (http_transfer_info_t*)data;
@ -232,7 +232,7 @@ static bool rarch_task_http_retriever(retro_task_t *task, void *data)
return true;
}
void *rarch_task_push_http_transfer(const char *url, bool mute, const char *type,
void *task_push_http_transfer(const char *url, bool mute, const char *type,
retro_task_callback_t cb, void *user_data)
{
char tmp[PATH_MAX_LENGTH];
@ -244,7 +244,7 @@ void *rarch_task_push_http_transfer(const char *url, bool mute, const char *type
if (string_is_empty(url))
return NULL;
find_data.func = rarch_task_http_finder;
find_data.func = task_http_finder;
find_data.userdata = (void*)url;
/* Concurrent download of the same file is not allowed */
@ -278,7 +278,7 @@ void *rarch_task_push_http_transfer(const char *url, bool mute, const char *type
if (!t)
goto error;
t->handler = rarch_task_http_transfer_handler;
t->handler = task_http_transfer_handler;
t->state = http;
t->mute = mute;
t->callback = cb;
@ -308,9 +308,9 @@ task_retriever_info_t *http_task_get_transfer_list(void)
task_retriever_data_t retrieve_data;
/* Fill retrieve data */
retrieve_data.handler = rarch_task_http_transfer_handler;
retrieve_data.handler = task_http_transfer_handler;
retrieve_data.element_size = sizeof(http_transfer_info_t);
retrieve_data.func = rarch_task_http_retriever;
retrieve_data.func = task_http_retriever;
/* Build list of current HTTP transfers and return it */
task_queue_ctl(TASK_QUEUE_CTL_RETRIEVE, &retrieve_data);

View File

@ -202,7 +202,7 @@ error:
return -1;
}
static void rarch_task_image_load_free_internal(nbio_handle_t *nbio)
static void task_image_load_free_internal(nbio_handle_t *nbio)
{
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data;
@ -245,7 +245,7 @@ static int cb_nbio_generic(nbio_handle_t *nbio, size_t *len)
return 0;
error:
rarch_task_image_load_free_internal(nbio);
task_image_load_free_internal(nbio);
return -1;
}
@ -275,7 +275,7 @@ error:
return -1;
}
bool rarch_task_image_load_handler(retro_task_t *task)
bool task_image_load_handler(retro_task_t *task)
{
nbio_handle_t *nbio = (nbio_handle_t*)task->state;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data;
@ -321,7 +321,7 @@ bool rarch_task_image_load_handler(retro_task_t *task)
return true;
}
bool rarch_task_push_image_load(const char *fullpath,
bool task_push_image_load(const char *fullpath,
const char *type, retro_task_callback_t cb, void *user_data)
{
nbio_handle_t *nbio = NULL;
@ -376,8 +376,8 @@ bool rarch_task_push_image_load(const char *fullpath,
nbio_begin_read(handle);
t->state = nbio;
t->handler = rarch_task_file_load_handler;
t->cleanup = rarch_task_image_load_free;
t->handler = task_file_load_handler;
t->cleanup = task_image_load_free;
t->callback = cb;
t->user_data = user_data;
@ -387,7 +387,7 @@ bool rarch_task_push_image_load(const char *fullpath,
error:
nbio_free(handle);
rarch_task_image_load_free(t);
task_image_load_free(t);
free(t);
error_msg:
@ -397,12 +397,12 @@ error_msg:
return false;
}
void rarch_task_image_load_free(retro_task_t *task)
void task_image_load_free(retro_task_t *task)
{
nbio_handle_t *nbio = task ? (nbio_handle_t*)task->state : NULL;
if (nbio) {
rarch_task_image_load_free_internal(nbio);
task_image_load_free_internal(nbio);
nbio_free(nbio->handle);
nbio->handle = NULL;
free(nbio);

View File

@ -43,9 +43,9 @@ typedef struct {
} overlay_loader_t;
static void rarch_task_overlay_resolve_iterate(retro_task_t *task);
static void task_overlay_resolve_iterate(retro_task_t *task);
static void rarch_task_overlay_image_done(struct overlay *overlay)
static void task_overlay_image_done(struct overlay *overlay)
{
overlay->pos = 0;
/* Divide iteration steps by half of total descs if size is even,
@ -53,7 +53,7 @@ static void rarch_task_overlay_image_done(struct overlay *overlay)
overlay->pos_increment = (overlay->size / 2) ? (overlay->size / 2) : 8;
}
static void rarch_task_overlay_load_desc_image(
static void task_overlay_load_desc_image(
overlay_loader_t *loader,
struct overlay_desc *desc,
struct overlay *input_overlay,
@ -85,7 +85,7 @@ static void rarch_task_overlay_load_desc_image(
input_overlay->pos ++;
}
static bool rarch_task_overlay_load_desc(
static bool task_overlay_load_desc(
overlay_loader_t *loader,
struct overlay_desc *desc,
struct overlay *input_overlay,
@ -288,7 +288,7 @@ end:
return ret;
}
static void rarch_task_overlay_deferred_loading(retro_task_t *task)
static void task_overlay_deferred_loading(retro_task_t *task)
{
size_t i = 0;
overlay_loader_t *loader = (overlay_loader_t*)task->state;
@ -310,7 +310,7 @@ static void rarch_task_overlay_deferred_loading(retro_task_t *task)
break;
#endif
case OVERLAY_IMAGE_TRANSFER_DONE:
rarch_task_overlay_image_done(&loader->overlays[loader->pos]);
task_overlay_image_done(&loader->overlays[loader->pos]);
loader->loading_status = OVERLAY_IMAGE_TRANSFER_DESC_IMAGE_ITERATE;
loader->overlays[loader->pos].pos = 0;
break;
@ -319,7 +319,7 @@ static void rarch_task_overlay_deferred_loading(retro_task_t *task)
{
if (overlay->pos < overlay->size)
{
rarch_task_overlay_load_desc_image(loader,
task_overlay_load_desc_image(loader,
&overlay->descs[overlay->pos], overlay,
loader->pos, overlay->pos);
}
@ -337,7 +337,7 @@ static void rarch_task_overlay_deferred_loading(retro_task_t *task)
{
if (overlay->pos < overlay->size)
{
if (!rarch_task_overlay_load_desc(loader,
if (!task_overlay_load_desc(loader,
&overlay->descs[overlay->pos], overlay,
loader->pos, overlay->pos,
overlay->image.width, overlay->image.height,
@ -361,7 +361,7 @@ static void rarch_task_overlay_deferred_loading(retro_task_t *task)
break;
case OVERLAY_IMAGE_TRANSFER_DESC_DONE:
if (loader->pos == 0)
rarch_task_overlay_resolve_iterate(task);
task_overlay_resolve_iterate(task);
loader->pos += 1;
loader->loading_status = OVERLAY_IMAGE_TRANSFER_NONE;
@ -373,7 +373,7 @@ static void rarch_task_overlay_deferred_loading(retro_task_t *task)
}
}
static void rarch_task_overlay_deferred_load(retro_task_t *task)
static void task_overlay_deferred_load(retro_task_t *task)
{
unsigned i;
overlay_loader_t *loader = (overlay_loader_t*)task->state;
@ -525,7 +525,7 @@ error:
loader->state = OVERLAY_STATUS_DEFERRED_ERROR;
}
static ssize_t rarch_task_overlay_find_index(const struct overlay *ol,
static ssize_t task_overlay_find_index(const struct overlay *ol,
const char *name, size_t size)
{
size_t i;
@ -542,7 +542,7 @@ static ssize_t rarch_task_overlay_find_index(const struct overlay *ol,
return -1;
}
static bool rarch_task_overlay_resolve_targets(struct overlay *ol,
static bool task_overlay_resolve_targets(struct overlay *ol,
size_t idx, size_t size)
{
unsigned i;
@ -555,7 +555,7 @@ static bool rarch_task_overlay_resolve_targets(struct overlay *ol,
if (*next)
{
next_idx = rarch_task_overlay_find_index(ol, next, size);
next_idx = task_overlay_find_index(ol, next, size);
if (next_idx < 0)
{
@ -573,7 +573,7 @@ static bool rarch_task_overlay_resolve_targets(struct overlay *ol,
return true;
}
static void rarch_task_overlay_resolve_iterate(retro_task_t *task)
static void task_overlay_resolve_iterate(retro_task_t *task)
{
overlay_loader_t *loader = (overlay_loader_t*)task->state;
bool not_done = loader->resolve_pos < loader->size;
@ -584,7 +584,7 @@ static void rarch_task_overlay_resolve_iterate(retro_task_t *task)
return;
}
if (!rarch_task_overlay_resolve_targets(loader->overlays,
if (!task_overlay_resolve_targets(loader->overlays,
loader->resolve_pos, loader->size))
{
RARCH_ERR("[Overlay]: Failed to resolve next targets.\n");
@ -607,7 +607,7 @@ static void rarch_task_overlay_resolve_iterate(retro_task_t *task)
loader->resolve_pos += 1;
}
static void rarch_task_overlay_free(retro_task_t *task)
static void task_overlay_free(retro_task_t *task)
{
unsigned i;
overlay_loader_t *loader = (overlay_loader_t*)task->state;
@ -637,20 +637,20 @@ static void rarch_task_overlay_free(retro_task_t *task)
free(loader);
}
static void rarch_task_overlay_handler(retro_task_t *task)
static void task_overlay_handler(retro_task_t *task)
{
overlay_loader_t *loader = (overlay_loader_t*)task->state;
switch (loader->state)
{
case OVERLAY_STATUS_DEFERRED_LOADING:
rarch_task_overlay_deferred_loading(task);
task_overlay_deferred_loading(task);
break;
case OVERLAY_STATUS_DEFERRED_LOAD:
rarch_task_overlay_deferred_load(task);
task_overlay_deferred_load(task);
break;
case OVERLAY_STATUS_DEFERRED_LOADING_RESOLVE:
rarch_task_overlay_resolve_iterate(task);
task_overlay_resolve_iterate(task);
break;
case OVERLAY_STATUS_DEFERRED_ERROR:
task->cancelled = true;
@ -675,11 +675,11 @@ static void rarch_task_overlay_handler(retro_task_t *task)
}
}
static bool rarch_task_overlay_finder(retro_task_t *task, void *user_data)
static bool task_overlay_finder(retro_task_t *task, void *user_data)
{
overlay_loader_t *loader = NULL;
if (!task || (task->handler != rarch_task_overlay_handler))
if (!task || (task->handler != task_overlay_handler))
return false;
if (!user_data)
@ -692,7 +692,7 @@ static bool rarch_task_overlay_finder(retro_task_t *task, void *user_data)
return string_is_equal(loader->overlay_path, (const char*)user_data);
}
static bool rarch_task_push_overlay_load(const char *overlay_path,
static bool task_push_overlay_load(const char *overlay_path,
retro_task_callback_t cb, void *user_data)
{
retro_task_t *t = NULL;
@ -704,7 +704,7 @@ static bool rarch_task_push_overlay_load(const char *overlay_path,
goto error;
/* Prevent overlay from being loaded if it already is being loaded */
find_data.func = rarch_task_overlay_finder;
find_data.func = task_overlay_finder;
find_data.userdata = (void*)overlay_path;
if (task_queue_ctl(TASK_QUEUE_CTL_FIND, &find_data))
goto error;
@ -736,8 +736,8 @@ static bool rarch_task_push_overlay_load(const char *overlay_path,
if (!t)
goto error;
t->handler = rarch_task_overlay_handler;
t->cleanup = rarch_task_overlay_free;
t->handler = task_overlay_handler;
t->cleanup = task_overlay_free;
t->state = loader;
t->callback = cb;
t->user_data = user_data;
@ -761,7 +761,7 @@ error:
return false;
}
bool rarch_task_push_overlay_load_default(
bool task_push_overlay_load_default(
retro_task_callback_t cb, void *user_data)
{
settings_t *settings = config_get_ptr();
@ -778,7 +778,7 @@ bool rarch_task_push_overlay_load_default(
return false;
}
return rarch_task_push_overlay_load(
return task_push_overlay_load(
osk_enable ? settings->path.osk_overlay : settings->path.overlay,
cb, user_data);
}

View File

@ -69,22 +69,22 @@ typedef struct nbio_handle
} nbio_handle_t;
#ifdef HAVE_NETWORKING
void *rarch_task_push_http_transfer(const char *url, bool mute, const char *type,
void *task_push_http_transfer(const char *url, bool mute, const char *type,
retro_task_callback_t cb, void *userdata);
task_retriever_info_t *http_task_get_transfer_list(void);
#endif
bool rarch_task_push_image_load(const char *fullpath, const char *type,
bool task_push_image_load(const char *fullpath, const char *type,
retro_task_callback_t cb, void *userdata);
#ifdef HAVE_LIBRETRODB
bool rarch_task_push_dbscan(const char *fullpath,
bool task_push_dbscan(const char *fullpath,
bool directory, retro_task_callback_t cb);
#endif
#ifdef HAVE_OVERLAY
bool rarch_task_push_overlay_load_default(
bool task_push_overlay_load_default(
retro_task_callback_t cb, void *user_data);
#endif
@ -98,11 +98,11 @@ 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 task_check_decompress(const char *source_file);
bool rarch_task_image_load_handler(retro_task_t *task);
bool task_image_load_handler(retro_task_t *task);
bool rarch_task_push_decompress(
bool task_push_decompress(
const char *source_file,
const char *target_dir,
const char *target_file,
@ -111,7 +111,7 @@ bool rarch_task_push_decompress(
retro_task_callback_t cb,
void *user_data);
bool rarch_task_push_content_load_default(
bool task_push_content_load_default(
const char *core_path,
const char *fullpath,
content_ctx_info_t *content_info,
@ -120,9 +120,9 @@ bool rarch_task_push_content_load_default(
retro_task_callback_t cb,
void *user_data);
void rarch_task_image_load_free(retro_task_t *task);
void task_image_load_free(retro_task_t *task);
void rarch_task_file_load_handler(retro_task_t *task);
void task_file_load_handler(retro_task_t *task);
/* TODO/FIXME - turn this into actual task */
bool take_screenshot(void);

View File

@ -276,7 +276,7 @@ static void poll_iteration(void)
if (core_name)
{
content_ctx_info_t content_info = {0};
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL,
__core.UTF8String,
&content_info,
@ -318,7 +318,7 @@ static void open_core_handler(NSOpenPanel *panel, NSInteger result)
{
content_ctx_info_t content_info = {0};
runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,
@ -354,7 +354,7 @@ static void open_document_handler(NSOpenPanel *panel, NSInteger result)
if (core_name)
{
content_ctx_info_t content_info = {0};
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,

View File

@ -577,7 +577,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, win32_file);
do_wm_close = true;
rarch_task_push_content_load_default(
task_push_content_load_default(
NULL, NULL,
&content_info,
CORE_TYPE_PLAIN,