From f513e1fac2f8b7ce2f83146fca17a523d1f90cc6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 1 Jul 2016 20:23:22 +0200 Subject: [PATCH] (menu_cbs.c) Cleanups --- menu/drivers/xmb.c | 1 - menu/menu_cbs.c | 23 +---------------------- menu/menu_driver.c | 2 -- menu/menu_driver.h | 3 --- 4 files changed, 1 insertion(+), 28 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 6b73662b72..91437d25d4 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3094,7 +3094,6 @@ static int xmb_list_bind_init_compare_label(menu_file_list_cbs_t *cbs, static int xmb_list_bind_init(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, - const char *elem0, const char *elem1, uint32_t label_hash, uint32_t menu_label_hash) { if (xmb_list_bind_init_compare_label(cbs, label_hash) == 0) diff --git a/menu/menu_cbs.c b/menu/menu_cbs.c index c7f83a99aa..07031091ff 100644 --- a/menu/menu_cbs.c +++ b/menu/menu_cbs.c @@ -15,7 +15,6 @@ #include #include -#include #include "menu_driver.h" #include "menu_cbs.h" @@ -39,10 +38,7 @@ void menu_cbs_init(void *data, unsigned type, size_t idx) { menu_ctx_bind_t bind_info; - char elem0[PATH_MAX_LENGTH] = {0}; - char elem1[PATH_MAX_LENGTH] = {0}; const char *repr_label = NULL; - struct string_list *str_list = NULL; const char *menu_label = NULL; uint32_t label_hash = 0; uint32_t menu_label_hash = 0; @@ -51,21 +47,10 @@ void menu_cbs_init(void *data, if (!list) return; - elem0[0] = '\0'; - elem1[0] = '\0'; - menu_entries_get_last_stack(NULL, &menu_label, NULL, &enum_idx, NULL); - if (label) - str_list = string_split(label, "|"); - - if (str_list && str_list->size > 0) - strlcpy(elem0, str_list->elems[0].data, sizeof(elem0)); - if (str_list && str_list->size > 1) - strlcpy(elem1, str_list->elems[1].data, sizeof(elem1)); - if (!label || !menu_label) - goto error; + return; label_hash = msg_hash_calculate(label); menu_label_hash = msg_hash_calculate(menu_label); @@ -146,16 +131,10 @@ void menu_cbs_init(void *data, bind_info.label = label; bind_info.type = type; bind_info.idx = idx; - bind_info.elem0 = elem0; - bind_info.elem1 = elem1; bind_info.label_hash = label_hash; bind_info.menu_label_hash = menu_label_hash; menu_driver_ctl(RARCH_MENU_CTL_BIND_INIT, &bind_info); - -error: - string_list_free(str_list); - str_list = NULL; } int menu_cbs_exit(void) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index adbd863efc..f35a2be49d 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -886,8 +886,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) bind->label, bind->type, bind->idx, - bind->elem0, - bind->elem1, bind->label_hash, bind->menu_label_hash); } diff --git a/menu/menu_driver.h b/menu/menu_driver.h index a706ac8123..6ea957ce55 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -290,7 +290,6 @@ typedef struct menu_ctx_driver void (*list_set_selection)(void *data, file_list_t *list); int (*bind_init)(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, - const char *elem0, const char *elem1, uint32_t label_hash, uint32_t menu_label_hash); bool (*load_image)(void *userdata, void *data, enum menu_image_type type); const char *ident; @@ -380,8 +379,6 @@ typedef struct menu_ctx_bind const char *label; unsigned type; size_t idx; - const char *elem0; - const char *elem1; uint32_t label_hash; uint32_t menu_label_hash; int retcode;