int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, const char *elem0, const char *elem1, const char *menu_label, uint32_t label_hash, uint32_t menu_label_hash) { if (!cbs) return -1; BIND_ACTION_LEFT(cbs, bind_left_generic); if (type == MENU_SETTING_NO_ITEM) { switch (menu_label_hash) { case MENU_VALUE_HORIZONTAL_MENU: case MENU_VALUE_MAIN_MENU: case 153956705: /* TODO/FIXME - dehardcode */ BIND_ACTION_LEFT(cbs, action_left_mainmenu); return 0; default: break; } } if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0) return 0; if (menu_cbs_init_bind_left_compare_type(cbs, type, label_hash, menu_label_hash) == 0) return 0; return -1; }
int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, const char *elem0, const char *elem1, const char *menu_label, uint32_t label_hash, uint32_t menu_label_hash) { if (!cbs) return -1; cbs->action_left = bind_left_generic; if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label_hash, elem0) == 0) return 0; if (menu_cbs_init_bind_left_compare_type(cbs, type, label_hash, menu_label_hash) == 0) return 0; return -1; }
int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, const char *menu_label, uint32_t label_hash) { if (!cbs) return -1; BIND_ACTION_LEFT(cbs, bind_left_generic); if (type == MENU_SETTING_NO_ITEM) { if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS_TAB)) ) { BIND_ACTION_LEFT(cbs, action_left_mainmenu); return 0; } } if (menu_cbs_init_bind_left_compare_label(cbs, label, label_hash, menu_label) == 0) return 0; if (menu_cbs_init_bind_left_compare_type(cbs, type, menu_label) == 0) return 0; return -1; }