We don't need enum_idx for task_push_image_load

This commit is contained in:
twinaphex 2016-12-30 05:33:04 +01:00
parent 94309b3acd
commit 876a68717e
6 changed files with 3 additions and 15 deletions

View File

@ -1059,7 +1059,6 @@ static int generic_action_ok(const char *path,
strlcpy(settings->path.menu_wallpaper,
action_path, sizeof(settings->path.menu_wallpaper));
task_push_image_load(action_path,
MENU_ENUM_LABEL_CB_MENU_WALLPAPER,
menu_display_handle_wallpaper_upload, NULL);
}
break;

View File

@ -1566,7 +1566,6 @@ static void mui_context_reset(void *data)
mui_context_reset_textures(mui);
task_push_image_load(settings->path.menu_wallpaper,
MENU_ENUM_LABEL_CB_MENU_WALLPAPER,
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -376,7 +376,6 @@ static void nk_menu_context_reset(void *data)
nk_menu_context_reset_textures(nk, iconpath);
task_push_image_load(settings->path.menu_wallpaper,
MENU_ENUM_LABEL_CB_MENU_WALLPAPER,
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -998,7 +998,6 @@ static void xmb_update_thumbnail_image(void *data)
if (path_file_exists(xmb->thumbnail_file_path))
task_push_image_load(xmb->thumbnail_file_path,
MENU_ENUM_LABEL_CB_MENU_THUMBNAIL,
menu_display_handle_thumbnail_upload, NULL);
else if (xmb->depth == 1)
xmb->thumbnail = 0;
@ -1012,7 +1011,6 @@ static void xmb_update_savestate_thumbnail_image(void *data)
if (path_file_exists(xmb->savestate_thumbnail_file_path))
task_push_image_load(xmb->savestate_thumbnail_file_path,
MENU_ENUM_LABEL_CB_MENU_SAVESTATE_THUMBNAIL,
menu_display_handle_savestate_thumbnail_upload, NULL);
else
xmb->savestate_thumbnail = 0;
@ -1356,7 +1354,6 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
if(path_file_exists(path))
{
task_push_image_load(path,
MENU_ENUM_LABEL_CB_MENU_WALLPAPER,
menu_display_handle_wallpaper_upload, NULL);
strlcpy(xmb->background_file_path,
path, sizeof(xmb->background_file_path));
@ -3462,7 +3459,6 @@ static void xmb_context_reset_background(const char *iconpath)
if (path_file_exists(path))
task_push_image_load(path,
MENU_ENUM_LABEL_CB_MENU_WALLPAPER,
menu_display_handle_wallpaper_upload, NULL);
}

View File

@ -325,22 +325,18 @@ bool task_image_load_handler(retro_task_t *task)
return true;
}
bool task_push_image_load(const char *fullpath,
enum msg_hash_enums enum_idx, retro_task_callback_t cb, void *user_data)
bool task_push_image_load(const char *fullpath, retro_task_callback_t cb, void *user_data)
{
nbio_handle_t *nbio = NULL;
retro_task_t *t = NULL;
struct nbio_image_handle *image = NULL;
bool supports_rgba = video_driver_supports_rgba();
retro_task_t *t = (retro_task_t*)calloc(1, sizeof(*t));
if (enum_idx == MSG_UNKNOWN)
goto error_msg;
t = (retro_task_t*)calloc(1, sizeof(*t));
if (!t)
goto error_msg;
nbio = (nbio_handle_t*)calloc(1, sizeof(*nbio));
if (!nbio)
goto error;

View File

@ -111,7 +111,6 @@ bool task_push_netplay_lan_scan(void);
#endif
bool task_push_image_load(const char *fullpath,
enum msg_hash_enums enum_idx,
retro_task_callback_t cb, void *userdata);
#ifdef HAVE_LIBRETRODB