mirror of
https://github.com/libretro/RetroArch
synced 2025-02-05 06:40:07 +00:00
Add param to dir_list_new_special
This commit is contained in:
parent
071f828b5e
commit
9e2dc0745e
@ -651,7 +651,7 @@ static void event_set_savestate_auto_index(void)
|
||||
fill_pathname_base(state_base, global->name.savestate,
|
||||
sizeof(state_base));
|
||||
|
||||
if (!(dir_list = dir_list_new_special(state_dir, DIR_LIST_PLAIN)))
|
||||
if (!(dir_list = dir_list_new_special(state_dir, DIR_LIST_PLAIN, NULL)))
|
||||
return;
|
||||
|
||||
for (i = 0; i < dir_list->size; i++)
|
||||
@ -1502,7 +1502,7 @@ bool event_command(enum event_command cmd)
|
||||
if (!*settings->video.shader_dir)
|
||||
return false;
|
||||
|
||||
global->shader_dir.list = dir_list_new_special(NULL, DIR_LIST_SHADERS);
|
||||
global->shader_dir.list = dir_list_new_special(NULL, DIR_LIST_SHADERS, NULL);
|
||||
|
||||
if (!global->shader_dir.list || global->shader_dir.list->size == 0)
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ void core_info_get_name(const char *path, char *s, size_t len)
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *contents = dir_list_new_special(NULL, DIR_LIST_CORES);
|
||||
struct string_list *contents = dir_list_new_special(NULL, DIR_LIST_CORES, NULL);
|
||||
|
||||
if (!contents)
|
||||
return;
|
||||
@ -174,7 +174,7 @@ core_info_list_t *core_info_list_new(void)
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *contents = dir_list_new_special(NULL, DIR_LIST_CORES);
|
||||
struct string_list *contents = dir_list_new_special(NULL, DIR_LIST_CORES, NULL);
|
||||
|
||||
if (!contents)
|
||||
return NULL;
|
||||
|
@ -392,7 +392,7 @@ database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
if (!db)
|
||||
return NULL;
|
||||
|
||||
db->list = dir_list_new_special(dir, DIR_LIST_CORE_INFO);
|
||||
db->list = dir_list_new_special(dir, DIR_LIST_CORE_INFO, NULL);
|
||||
|
||||
if (!db->list)
|
||||
goto error;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "file_ext.h"
|
||||
#include "configuration.h"
|
||||
|
||||
struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_type type)
|
||||
struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_type type, const char *filter)
|
||||
{
|
||||
const char *dir = NULL;
|
||||
const char *exts = NULL;
|
||||
@ -54,7 +54,7 @@ struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_ty
|
||||
break;
|
||||
case DIR_LIST_PLAIN:
|
||||
dir = input_dir;
|
||||
exts = NULL;
|
||||
exts = filter;
|
||||
break;
|
||||
case DIR_LIST_NONE:
|
||||
default:
|
||||
|
@ -35,6 +35,6 @@ enum dir_list_type
|
||||
DIR_LIST_SHADERS
|
||||
};
|
||||
|
||||
struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_type type);
|
||||
struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_type type, const char *filter);
|
||||
|
||||
#endif
|
||||
|
@ -1283,6 +1283,7 @@ static bool zarch_menu_init_list(void *data)
|
||||
|
||||
strlcpy(info.label, menu_hash_to_str(MENU_VALUE_HISTORY_TAB), sizeof(info.label));
|
||||
|
||||
menu_entries_push(menu_stack, info.path, info.label, info.type, info.flags, 0);
|
||||
menu_entries_push(menu_stack, info.path, info.label, info.type, info.flags, 0);
|
||||
|
||||
event_command(EVENT_CMD_HISTORY_INIT);
|
||||
|
@ -2495,7 +2495,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
ret = menu_displaylist_parse_settings(menu, info,
|
||||
menu_hash_to_str(MENU_LABEL_CONTENT_HISTORY_SIZE), PARSE_ONLY_UINT, false);
|
||||
{
|
||||
struct string_list *str_list = dir_list_new_special(settings->playlist_directory, DIR_LIST_COLLECTIONS);
|
||||
struct string_list *str_list = dir_list_new_special(settings->playlist_directory, DIR_LIST_COLLECTIONS, NULL);
|
||||
if (str_list && str_list->size)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -543,7 +543,7 @@ void rarch_main_data_db_iterate(bool is_thread)
|
||||
{
|
||||
case DATABASE_STATUS_ITERATE_BEGIN:
|
||||
if (db_state && !db_state->list)
|
||||
db_state->list = dir_list_new_special(NULL, DIR_LIST_DATABASES);
|
||||
db_state->list = dir_list_new_special(NULL, DIR_LIST_DATABASES, NULL);
|
||||
db->status = DATABASE_STATUS_ITERATE_START;
|
||||
break;
|
||||
case DATABASE_STATUS_ITERATE_START:
|
||||
|
Loading…
x
Reference in New Issue
Block a user