mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Add file_list_get_previous_stack
This commit is contained in:
parent
74c5d5d1d8
commit
5acde7a8a6
12
file_list.c
12
file_list.c
@ -220,6 +220,18 @@ void file_list_get_at_offset(const file_list_t *list, size_t index,
|
||||
*file_type = list->list[index].type;
|
||||
}
|
||||
|
||||
bool file_list_get_previous_stack(const file_list_t *list,
|
||||
const char **path, const char **label,
|
||||
unsigned *file_type)
|
||||
{
|
||||
if (list->size > 1)
|
||||
{
|
||||
file_list_get_at_offset(list, list->size - 2, path, label, file_type);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void file_list_get_last(const file_list_t *list,
|
||||
const char **path, const char **label,
|
||||
unsigned *file_type)
|
||||
|
@ -56,6 +56,10 @@ void file_list_push(file_list_t *userdata, const char *path,
|
||||
void file_list_pop(file_list_t *list, size_t *directory_ptr);
|
||||
void file_list_clear(file_list_t *list);
|
||||
|
||||
bool file_list_get_previous_stack(const file_list_t *list,
|
||||
const char **path, const char **label,
|
||||
unsigned *file_type);
|
||||
|
||||
void file_list_get_last(const file_list_t *list,
|
||||
const char **path, const char **label,
|
||||
unsigned *type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user