From 1f7645b6e80ede937755c02ee74f7edad750a1ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 22 Aug 2020 14:05:48 +0200 Subject: [PATCH] Cleanup generic_menu_iterate --- retroarch.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/retroarch.c b/retroarch.c index f1ed21b034..73d186d50e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -4418,7 +4418,7 @@ static int generic_menu_iterate( size_t selection = menu_st->selection_ptr; menu_file_list_cbs_t *cbs = selection_buf ? (menu_file_list_cbs_t*) - file_list_get_actiondata_at_offset(selection_buf, selection) + file_list_get_actiondata_at_offset(selection_buf, selection) : NULL; if (cbs && cbs->enum_idx != MSG_UNKNOWN) @@ -4439,8 +4439,8 @@ static int generic_menu_iterate( /* Search for specified core */ if (core_list && path && - core_updater_list_get_filename(core_list, path, &entry) && - !string_is_empty(entry->description)) + core_updater_list_get_filename(core_list, path, &entry) && + !string_is_empty(entry->description)) strlcpy(menu->menu_state_msg, entry->description, sizeof(menu->menu_state_msg)); else @@ -4466,8 +4466,8 @@ static int generic_menu_iterate( core_info.path = path; if (path && - core_info_find(&core_info) && - !string_is_empty(core_info.inf->description)) + core_info_find(&core_info) && + !string_is_empty(core_info.inf->description)) strlcpy(menu->menu_state_msg, core_info.inf->description, sizeof(menu->menu_state_msg)); else @@ -4618,7 +4618,7 @@ static int generic_menu_iterate( ret = menu_entry_action(&entry, selection, (enum menu_action)action); if (ret) - goto end; + return -1; BIT64_SET(menu->state, MENU_STATE_POST_ITERATE); @@ -4653,7 +4653,6 @@ static int generic_menu_iterate( menu_input_post_iterate(p_rarch, &ret, action, current_time); -end: if (ret) return -1; return 0;