diff --git a/menu/menu_entries_cbs_ok.c b/menu/menu_entries_cbs_ok.c index 4ec2af4eb1..ae97fb083d 100644 --- a/menu/menu_entries_cbs_ok.c +++ b/menu/menu_entries_cbs_ok.c @@ -72,45 +72,45 @@ static int action_ok_file_load_with_detect_core(const char *path, fill_pathname_join(detect_content_path, menu_path, path, sizeof(detect_content_path)); - if (ret == -1) + switch (ret) { - switch (hash_label) - { - case MENU_LABEL_COLLECTION: - info.list = menu->menu_list->menu_stack; - info.type = 0; - info.directory_ptr = idx; - rdb_entry_start_game_selection_ptr = idx; - strlcpy(info.path, settings->libretro_directory, sizeof(info.path)); - strlcpy(info.label, "deferred_core_list_set", sizeof(info.label)); + case -1: + switch (hash_label) + { + case MENU_LABEL_COLLECTION: + info.list = menu->menu_list->menu_stack; + info.type = 0; + info.directory_ptr = idx; + rdb_entry_start_game_selection_ptr = idx; + strlcpy(info.path, settings->libretro_directory, sizeof(info.path)); + strlcpy(info.label, "deferred_core_list_set", sizeof(info.label)); - return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC); - default: - event_command(EVENT_CMD_LOAD_CORE); - menu_common_load_content(false); - return -1; - } - } + return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC); + default: + event_command(EVENT_CMD_LOAD_CORE); + menu_common_load_content(false); + return -1; + } + break; + case 0: + info.list = menu->menu_list->menu_stack; + info.type = 0; + info.directory_ptr = idx; + strlcpy(info.path, settings->libretro_directory, sizeof(info.path)); - if (ret == 0) - { - info.list = menu->menu_list->menu_stack; - info.type = 0; - info.directory_ptr = idx; - strlcpy(info.path, settings->libretro_directory, sizeof(info.path)); + switch (hash_label) + { + case MENU_LABEL_COLLECTION: + rdb_entry_start_game_selection_ptr = idx; + strlcpy(info.label, "deferred_core_list_set", sizeof(info.label)); + break; + default: + strlcpy(info.label, "deferred_core_list", sizeof(info.label)); + break; + } - switch (hash_label) - { - case MENU_LABEL_COLLECTION: - rdb_entry_start_game_selection_ptr = idx; - strlcpy(info.label, "deferred_core_list_set", sizeof(info.label)); - break; - default: - strlcpy(info.label, "deferred_core_list", sizeof(info.label)); - break; - } - - ret = menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC); + ret = menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC); + break; } return ret; diff --git a/menu/menu_input.c b/menu/menu_input.c index 5a525c0314..c29f5a2cf4 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -128,10 +128,10 @@ void menu_input_st_string_callback(void *userdata, const char *str) if (str && *str) { - rarch_setting_t *current_setting = NULL; global_t *global = global_get_ptr(); + rarch_setting_t *current_setting = menu_setting_find(menu->keyboard.label_setting); - if ((current_setting = menu_setting_find(menu->keyboard.label_setting))) + if (current_setting) { setting_set_with_string_representation(current_setting, str); menu_setting_generic(current_setting, false);