mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(XMB) Set fullpath dir for each node entry
This commit is contained in:
parent
51504286be
commit
9d9a5e71ab
@ -83,6 +83,7 @@ typedef struct
|
||||
float y;
|
||||
uintptr_t icon;
|
||||
uintptr_t content_icon;
|
||||
char fullpath[4096];
|
||||
} xmb_node_t;
|
||||
|
||||
enum
|
||||
@ -3520,7 +3521,10 @@ static void xmb_navigation_alphabet(void *data, size_t *unused)
|
||||
|
||||
static void xmb_list_insert(void *userdata,
|
||||
file_list_t *list,
|
||||
const char *path, const char *unused, size_t list_size)
|
||||
const char *path,
|
||||
const char *fullpath,
|
||||
const char *unused,
|
||||
size_t list_size)
|
||||
{
|
||||
size_t selection;
|
||||
int current = 0;
|
||||
@ -3545,6 +3549,10 @@ static void xmb_list_insert(void *userdata,
|
||||
}
|
||||
|
||||
current = selection;
|
||||
|
||||
if (!string_is_empty(fullpath))
|
||||
strlcpy(node->fullpath, fullpath, sizeof(node->fullpath));
|
||||
|
||||
node->alpha = xmb->items.passive.alpha;
|
||||
node->zoom = xmb->items.passive.zoom;
|
||||
node->label_alpha = node->alpha;
|
||||
|
@ -828,7 +828,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
if (!list || !menu_driver_ctx || !menu_driver_ctx->list_insert)
|
||||
return false;
|
||||
menu_driver_ctx->list_insert(menu_userdata,
|
||||
list->list, list->path, list->label, list->idx);
|
||||
list->list, list->path, list->fullpath,
|
||||
list->label, list->idx);
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_LOAD_IMAGE:
|
||||
|
@ -260,7 +260,7 @@ typedef struct menu_ctx_driver
|
||||
void (*navigation_ascend_alphabet)(void *, size_t *);
|
||||
bool (*lists_init)(void*);
|
||||
void (*list_insert)(void *userdata,
|
||||
file_list_t *list, const char *, const char *, size_t);
|
||||
file_list_t *list, const char *, const char *, const char *, size_t);
|
||||
int (*list_prepend)(void *userdata,
|
||||
file_list_t *list, const char *, const char *, size_t);
|
||||
void (*list_free)(file_list_t *list, size_t, size_t);
|
||||
|
@ -341,21 +341,33 @@ void menu_entries_append(file_list_t *list, const char *path, const char *label,
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
size_t idx;
|
||||
const char *menu_path = NULL;
|
||||
const char *menu_label = NULL;
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
if (!list || !label)
|
||||
return;
|
||||
|
||||
file_list_append(list, path, label, type, directory_ptr, entry_idx);
|
||||
|
||||
idx = list->size - 1;
|
||||
menu_entries_get_last_stack(&menu_path, &menu_label, NULL, NULL, NULL);
|
||||
|
||||
list_info.list = list;
|
||||
list_info.path = path;
|
||||
list_info.label = label;
|
||||
list_info.idx = idx;
|
||||
idx = list->size - 1;
|
||||
|
||||
list_info.list = list;
|
||||
list_info.path = path;
|
||||
list_info.fullpath = NULL;
|
||||
|
||||
if (!string_is_empty(menu_path))
|
||||
list_info.fullpath = strdup(menu_path);
|
||||
|
||||
list_info.label = label;
|
||||
list_info.idx = idx;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
||||
|
||||
if (list_info.fullpath)
|
||||
free(list_info.fullpath);
|
||||
|
||||
file_list_free_actiondata(list, idx);
|
||||
cbs = (menu_file_list_cbs_t*)
|
||||
calloc(1, sizeof(menu_file_list_cbs_t));
|
||||
@ -377,21 +389,32 @@ void menu_entries_append_enum(file_list_t *list, const char *path, const char *l
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
size_t idx;
|
||||
const char *menu_path = NULL;
|
||||
const char *menu_label = NULL;
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
if (!list || !label)
|
||||
return;
|
||||
|
||||
file_list_append(list, path, label, type, directory_ptr, entry_idx);
|
||||
|
||||
idx = list->size - 1;
|
||||
menu_entries_get_last_stack(&menu_path, &menu_label, NULL, NULL, NULL);
|
||||
|
||||
list_info.list = list;
|
||||
list_info.path = path;
|
||||
list_info.label = label;
|
||||
list_info.idx = idx;
|
||||
idx = list->size - 1;
|
||||
|
||||
list_info.fullpath = NULL;
|
||||
|
||||
if (!string_is_empty(menu_path))
|
||||
list_info.fullpath = strdup(menu_path);
|
||||
list_info.list = list;
|
||||
list_info.path = path;
|
||||
list_info.label = label;
|
||||
list_info.idx = idx;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_INSERT, &list_info);
|
||||
|
||||
if (list_info.fullpath)
|
||||
free(list_info.fullpath);
|
||||
|
||||
file_list_free_actiondata(list, idx);
|
||||
cbs = (menu_file_list_cbs_t*)
|
||||
calloc(1, sizeof(menu_file_list_cbs_t));
|
||||
|
@ -39,6 +39,7 @@ typedef struct menu_ctx_list
|
||||
file_list_t *list;
|
||||
size_t list_size;
|
||||
const char *path;
|
||||
char *fullpath;
|
||||
const char *label;
|
||||
size_t idx;
|
||||
enum menu_list_type type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user