mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Add user_data pointer to rarch_task_push_image_load()
This commit is contained in:
parent
84cad09983
commit
92683976a5
@ -629,8 +629,8 @@ static int generic_action_ok(const char *path,
|
||||
if (path_file_exists(action_path))
|
||||
{
|
||||
strlcpy(settings->menu.wallpaper, action_path, sizeof(settings->menu.wallpaper));
|
||||
rarch_task_push_image_load(action_path,
|
||||
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload);
|
||||
rarch_task_push_image_load(action_path, "cb_menu_wallpaper",
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_LOAD_CORE:
|
||||
|
@ -1165,7 +1165,7 @@ static void mui_context_reset(void)
|
||||
mui_context_reset_textures(mui, iconpath);
|
||||
|
||||
rarch_task_push_image_load(settings->menu.wallpaper, "cb_menu_wallpaper",
|
||||
menu_display_handle_wallpaper_upload);
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
|
||||
static int mui_environ(menu_environ_cb_t type, void *data)
|
||||
|
@ -547,7 +547,7 @@ static void xmb_update_boxart_image(xmb_handle_t *xmb)
|
||||
{
|
||||
if (path_file_exists(xmb->boxart_file_path))
|
||||
rarch_task_push_image_load(xmb->boxart_file_path, "cb_menu_boxart",
|
||||
menu_display_handle_boxart_upload);
|
||||
menu_display_handle_boxart_upload, NULL);
|
||||
else if (xmb->depth == 1)
|
||||
xmb->boxart = 0;
|
||||
}
|
||||
@ -818,9 +818,12 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
|
||||
if (!path_file_exists(path))
|
||||
xmb_fill_default_background_path(xmb, path, sizeof(path));
|
||||
|
||||
if(strcmp(path, xmb->background_file_path) != 0) {
|
||||
if(path_file_exists(path)) {
|
||||
rarch_task_push_image_load(path, "cb_menu_wallpaper", menu_display_handle_wallpaper_upload);
|
||||
if(strcmp(path, xmb->background_file_path) != 0)
|
||||
{
|
||||
if(path_file_exists(path))
|
||||
{
|
||||
rarch_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));
|
||||
}
|
||||
}
|
||||
@ -2253,7 +2256,8 @@ static void xmb_context_reset_background(const char *iconpath)
|
||||
strlcpy(path, settings->menu.wallpaper, sizeof(path));
|
||||
|
||||
if (path_file_exists(path))
|
||||
rarch_task_push_image_load(path, "cb_menu_wallpaper", menu_display_handle_wallpaper_upload);
|
||||
rarch_task_push_image_load(path, "cb_menu_wallpaper",
|
||||
menu_display_handle_wallpaper_upload, NULL);
|
||||
}
|
||||
|
||||
static void xmb_context_reset(void)
|
||||
|
@ -1111,7 +1111,7 @@ static void *zarch_init(void)
|
||||
|
||||
if (settings->menu.wallpaper[0] != '\0')
|
||||
rarch_task_push_image_load(settings->menu.wallpaper,
|
||||
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload);
|
||||
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload, NULL);
|
||||
|
||||
zui->ca.allocated = 0;
|
||||
|
||||
@ -1230,7 +1230,7 @@ static void zarch_context_reset(void)
|
||||
zarch_context_bg_destroy(zui);
|
||||
|
||||
rarch_task_push_image_load(settings->menu.wallpaper,
|
||||
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload);
|
||||
"cb_menu_wallpaper", menu_display_handle_wallpaper_upload, NULL);
|
||||
|
||||
zarch_allocate_white_texture(zui);
|
||||
|
||||
|
@ -311,7 +311,7 @@ static int cb_nbio_image_menu_boxart(void *data, size_t len)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool rarch_task_push_image_load(const char *fullpath, const char *type, rarch_task_callback_t cb)
|
||||
bool rarch_task_push_image_load(const char *fullpath, const char *type, rarch_task_callback_t cb, void *user_data)
|
||||
{
|
||||
#if defined(HAVE_RPNG) && defined(HAVE_MENU)
|
||||
rarch_task_t *t;
|
||||
@ -348,6 +348,7 @@ bool rarch_task_push_image_load(const char *fullpath, const char *type, rarch_ta
|
||||
t->state = nbio;
|
||||
t->handler = rarch_task_file_load_handler;
|
||||
t->callback = cb;
|
||||
t->user_data = user_data;
|
||||
|
||||
rarch_task_push(t);
|
||||
#endif
|
||||
|
@ -73,7 +73,7 @@ typedef struct {
|
||||
bool rarch_task_push_http_transfer(const char *url, const char *type, rarch_task_callback_t cb, void *user_data);
|
||||
#endif
|
||||
|
||||
bool rarch_task_push_image_load(const char *fullpath, const char *type, rarch_task_callback_t cb);
|
||||
bool rarch_task_push_image_load(const char *fullpath, const char *type, rarch_task_callback_t cb, void *user_data);
|
||||
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
bool rarch_task_push_dbscan(const char *fullpath, bool directory, rarch_task_callback_t cb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user