mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Set fullpath for menu_entries_prepend
This commit is contained in:
parent
c6988fbda7
commit
830c01476f
@ -436,21 +436,30 @@ void menu_entries_prepend(file_list_t *list, const char *path, const char *label
|
|||||||
{
|
{
|
||||||
menu_ctx_list_t list_info;
|
menu_ctx_list_t list_info;
|
||||||
size_t idx;
|
size_t idx;
|
||||||
|
const char *menu_path = NULL;
|
||||||
|
const char *menu_label = NULL;
|
||||||
menu_file_list_cbs_t *cbs = NULL;
|
menu_file_list_cbs_t *cbs = NULL;
|
||||||
if (!list || !label)
|
if (!list || !label)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
file_list_prepend(list, path, label, type, directory_ptr, entry_idx);
|
file_list_prepend(list, path, label, type, directory_ptr, entry_idx);
|
||||||
|
|
||||||
|
menu_entries_get_last_stack(&menu_path, &menu_label, NULL, NULL, NULL);
|
||||||
|
|
||||||
idx = 0;
|
idx = 0;
|
||||||
|
|
||||||
list_info.list = list;
|
if (!string_is_empty(menu_path))
|
||||||
list_info.path = path;
|
list_info.fullpath = strdup(menu_path);
|
||||||
list_info.label = label;
|
list_info.list = list;
|
||||||
list_info.idx = idx;
|
list_info.path = path;
|
||||||
|
list_info.label = label;
|
||||||
|
list_info.idx = idx;
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
||||||
|
|
||||||
|
if (list_info.fullpath)
|
||||||
|
free(list_info.fullpath);
|
||||||
|
|
||||||
file_list_free_actiondata(list, idx);
|
file_list_free_actiondata(list, idx);
|
||||||
cbs = (menu_file_list_cbs_t*)
|
cbs = (menu_file_list_cbs_t*)
|
||||||
calloc(1, sizeof(menu_file_list_cbs_t));
|
calloc(1, sizeof(menu_file_list_cbs_t));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user