From b872260bf3895b4ab1d8d61fdf4d30a7edc29369 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 17 Jun 2016 14:34:28 +0200 Subject: [PATCH] Update menu_entry_pathdir_set_value --- menu/cbs/menu_cbs_ok.c | 5 ++++- menu/menu_entry.c | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index dc43d8d65c..c87002e751 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1239,7 +1239,10 @@ static int action_ok_remap_file_save_game(const char *path, int action_ok_path_use_directory(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - return menu_entry_pathdir_set_value(0, NULL); + const char *menu_path = NULL; + + menu_entries_get_last_stack(&menu_path, NULL, NULL, NULL); + return menu_entry_pathdir_set_value(0, menu_path); } #ifdef HAVE_LIBRETRODB diff --git a/menu/menu_entry.c b/menu/menu_entry.c index 4a1989ac75..21cb6b950f 100644 --- a/menu/menu_entry.c +++ b/menu/menu_entry.c @@ -216,18 +216,15 @@ void menu_entry_pathdir_get_value(uint32_t i, char *s, size_t len) int menu_entry_pathdir_set_value(uint32_t i, const char *s) { - const char *menu_path = NULL; menu_file_list_cbs_t *cbs = menu_entries_get_last_stack_actiondata(); - menu_entries_get_last_stack(&menu_path, NULL, NULL, NULL); - if (!cbs || !cbs->setting) return -1; if (menu_setting_get_type(cbs->setting) != ST_DIR) return -1; - menu_setting_set_with_string_representation(cbs->setting, menu_path); + menu_setting_set_with_string_representation(cbs->setting, s); menu_setting_generic(cbs->setting, false); menu_entries_flush_stack(NULL, 49);