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,
|
fill_pathname_base(state_base, global->name.savestate,
|
||||||
sizeof(state_base));
|
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;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < dir_list->size; i++)
|
for (i = 0; i < dir_list->size; i++)
|
||||||
|
@ -1502,7 +1502,7 @@ bool event_command(enum event_command cmd)
|
||||||
if (!*settings->video.shader_dir)
|
if (!*settings->video.shader_dir)
|
||||||
return false;
|
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)
|
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_t *core_info = NULL;
|
||||||
core_info_list_t *core_info_list = NULL;
|
core_info_list_t *core_info_list = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
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)
|
if (!contents)
|
||||||
return;
|
return;
|
||||||
|
@ -174,7 +174,7 @@ core_info_list_t *core_info_list_new(void)
|
||||||
core_info_t *core_info = NULL;
|
core_info_t *core_info = NULL;
|
||||||
core_info_list_t *core_info_list = NULL;
|
core_info_list_t *core_info_list = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
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)
|
if (!contents)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -392,7 +392,7 @@ database_info_handle_t *database_info_dir_init(const char *dir,
|
||||||
if (!db)
|
if (!db)
|
||||||
return NULL;
|
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)
|
if (!db->list)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "file_ext.h"
|
#include "file_ext.h"
|
||||||
#include "configuration.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 *dir = NULL;
|
||||||
const char *exts = 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;
|
break;
|
||||||
case DIR_LIST_PLAIN:
|
case DIR_LIST_PLAIN:
|
||||||
dir = input_dir;
|
dir = input_dir;
|
||||||
exts = NULL;
|
exts = filter;
|
||||||
break;
|
break;
|
||||||
case DIR_LIST_NONE:
|
case DIR_LIST_NONE:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -35,6 +35,6 @@ enum dir_list_type
|
||||||
DIR_LIST_SHADERS
|
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
|
#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));
|
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);
|
menu_entries_push(menu_stack, info.path, info.label, info.type, info.flags, 0);
|
||||||
|
|
||||||
event_command(EVENT_CMD_HISTORY_INIT);
|
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,
|
ret = menu_displaylist_parse_settings(menu, info,
|
||||||
menu_hash_to_str(MENU_LABEL_CONTENT_HISTORY_SIZE), PARSE_ONLY_UINT, false);
|
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)
|
if (str_list && str_list->size)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
|
@ -543,7 +543,7 @@ void rarch_main_data_db_iterate(bool is_thread)
|
||||||
{
|
{
|
||||||
case DATABASE_STATUS_ITERATE_BEGIN:
|
case DATABASE_STATUS_ITERATE_BEGIN:
|
||||||
if (db_state && !db_state->list)
|
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;
|
db->status = DATABASE_STATUS_ITERATE_START;
|
||||||
break;
|
break;
|
||||||
case DATABASE_STATUS_ITERATE_START:
|
case DATABASE_STATUS_ITERATE_START:
|
||||||
|
|
Loading…
Reference in New Issue