mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Update menu_entry_pathdir_set_value
This commit is contained in:
parent
96073cf057
commit
b872260bf3
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user