mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-29 15:32:01 +00:00
Revert "Add include_compressed param to dir_list_new."
This commit is contained in:
parent
7ba046df6e
commit
aa382a5c7c
@ -242,7 +242,7 @@ rarch_dsp_filter_t *rarch_dsp_filter_new(
|
||||
#if !defined(HAVE_FILTERS_BUILTIN) && defined(HAVE_DYLIB)
|
||||
fill_pathname_basedir(basedir, filter_config, sizeof(basedir));
|
||||
|
||||
plugs = dir_list_new(basedir, EXT_EXECUTABLES, false, false);
|
||||
plugs = dir_list_new(basedir, EXT_EXECUTABLES, false);
|
||||
if (!plugs)
|
||||
goto error;
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@ struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_ty
|
||||
const char *exts = NULL;
|
||||
bool include_dirs = false;
|
||||
|
||||
global_t *global = global_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
(void)input_dir;
|
||||
@ -58,5 +58,5 @@ struct string_list *dir_list_new_special(const char *input_dir, enum dir_list_ty
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return dir_list_new(dir, exts, include_dirs, false);
|
||||
return dir_list_new(dir, exts, include_dirs);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ static void find_first_libretro_core(char *first_file,
|
||||
RARCH_LOG("Searching for valid libretro implementation in: \"%s\".\n",
|
||||
dir);
|
||||
|
||||
list = dir_list_new(dir, ext, false, false);
|
||||
list = dir_list_new(dir, ext, false);
|
||||
if (!list)
|
||||
{
|
||||
RARCH_ERR("Couldn't read directory. Cannot infer default libretro core.\n");
|
||||
|
@ -444,7 +444,7 @@ static bool gfx_ctx_drm_egl_init(void *data)
|
||||
return false;
|
||||
|
||||
drm->g_drm_fd = -1;
|
||||
gpu_descriptors = dir_list_new("/dev/dri", NULL, false, false);
|
||||
gpu_descriptors = dir_list_new("/dev/dri", NULL, false);
|
||||
|
||||
nextgpu:
|
||||
free_drm_resources(drm);
|
||||
|
@ -396,7 +396,7 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_config,
|
||||
#if defined(HAVE_DYLIB)
|
||||
fill_pathname_basedir(basedir, filter_config, sizeof(basedir));
|
||||
|
||||
plugs = dir_list_new(basedir, EXT_EXECUTABLES, false, false);
|
||||
plugs = dir_list_new(basedir, EXT_EXECUTABLES, false);
|
||||
if (!plugs)
|
||||
{
|
||||
RARCH_ERR("[SoftFilter]: Could not build up string list...\n");
|
||||
|
@ -199,10 +199,10 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
||||
sizeof(path));
|
||||
|
||||
if (settings)
|
||||
list = dir_list_new(path, "cfg", false, false);
|
||||
list = dir_list_new(path, "cfg", false);
|
||||
|
||||
if (!list || !list->size)
|
||||
list = dir_list_new(settings->input.autoconfig_dir, "cfg", false, false);
|
||||
list = dir_list_new(settings->input.autoconfig_dir, "cfg", false);
|
||||
|
||||
if(!list)
|
||||
return false;
|
||||
|
@ -132,14 +132,13 @@ static bool dirent_is_directory(const char *path,
|
||||
|
||||
/**
|
||||
* parse_dir_entry:
|
||||
* @name : name of the directory listing entry.
|
||||
* @file_path : file path of the directory listing entry.
|
||||
* @is_dir : is the directory listing a directory?
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_compressed : Include compressed files, even if not part of ext_list.
|
||||
* @list : pointer to directory listing.
|
||||
* @ext_list : pointer to allowed file extensions listing.
|
||||
* @file_ext : file extension of the directory listing entry.
|
||||
* @name : name of the directory listing entry.
|
||||
* @file_path : file path of the directory listing entry.
|
||||
* @is_dir : is the directory listing a directory?
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @list : pointer to directory listing.
|
||||
* @ext_list : pointer to allowed file extensions listing.
|
||||
* @file_ext : file extension of the directory listing entry.
|
||||
*
|
||||
* Parses a directory listing.
|
||||
*
|
||||
@ -147,7 +146,7 @@ static bool dirent_is_directory(const char *path,
|
||||
* continue to the next entry in the directory listing.
|
||||
**/
|
||||
static int parse_dir_entry(const char *name, char *file_path,
|
||||
bool is_dir, bool include_dirs, bool include_compressed,
|
||||
bool is_dir, bool include_dirs,
|
||||
struct string_list *list, struct string_list *ext_list,
|
||||
const char *file_ext)
|
||||
{
|
||||
@ -173,9 +172,6 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
if (!is_compressed_file && !is_dir && ext_list && !supported_by_core)
|
||||
return 1;
|
||||
|
||||
if (!include_compressed && !supported_by_core)
|
||||
return 1;
|
||||
|
||||
if (is_dir)
|
||||
attr.i = RARCH_DIRECTORY;
|
||||
if (is_compressed_file)
|
||||
@ -199,10 +195,9 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
|
||||
/**
|
||||
* dir_list_new:
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_compressed : Only include files which match ext. Do not try to match compressed files, etc.
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
*
|
||||
* Create a directory listing.
|
||||
*
|
||||
@ -210,7 +205,7 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
* NULL in case of error. Has to be freed manually.
|
||||
**/
|
||||
struct string_list *dir_list_new(const char *dir,
|
||||
const char *ext, bool include_dirs, bool include_compressed)
|
||||
const char *ext, bool include_dirs)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
WIN32_FIND_DATA ffd;
|
||||
@ -252,14 +247,14 @@ struct string_list *dir_list_new(const char *dir,
|
||||
fill_pathname_join(file_path, dir, name, sizeof(file_path));
|
||||
|
||||
ret = parse_dir_entry(name, file_path, is_dir,
|
||||
include_dirs, include_compressed, list, ext_list, file_ext);
|
||||
include_dirs, list, ext_list, file_ext);
|
||||
|
||||
if (ret == -1)
|
||||
goto error;
|
||||
|
||||
if (ret == 1)
|
||||
continue;
|
||||
} while (FindNextFile(hFind, &ffd) != 0);
|
||||
}while (FindNextFile(hFind, &ffd) != 0);
|
||||
|
||||
FindClose(hFind);
|
||||
string_list_free(ext_list);
|
||||
@ -323,7 +318,7 @@ error:
|
||||
is_dir = dirent_is_directory(file_path, entry);
|
||||
|
||||
ret = parse_dir_entry(name, file_path, is_dir,
|
||||
include_dirs, include_compressed, list, ext_list, file_ext);
|
||||
include_dirs, list, ext_list, file_ext);
|
||||
|
||||
if (ret == -1)
|
||||
goto error;
|
||||
@ -338,6 +333,7 @@ error:
|
||||
return list;
|
||||
|
||||
error:
|
||||
|
||||
if (directory)
|
||||
closedir(directory);
|
||||
#endif
|
||||
|
@ -105,14 +105,13 @@ static bool dirent_is_directory(const char *path)
|
||||
|
||||
/**
|
||||
* parse_dir_entry:
|
||||
* @name : name of the directory listing entry.
|
||||
* @file_path : file path of the directory listing entry.
|
||||
* @is_dir : is the directory listing a directory?
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_compressed : include compressed files, even when not part of ext_list.
|
||||
* @list : pointer to directory listing.
|
||||
* @ext_list : pointer to allowed file extensions listing.
|
||||
* @file_ext : file extension of the directory listing entry.
|
||||
* @name : name of the directory listing entry.
|
||||
* @file_path : file path of the directory listing entry.
|
||||
* @is_dir : is the directory listing a directory?
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @list : pointer to directory listing.
|
||||
* @ext_list : pointer to allowed file extensions listing.
|
||||
* @file_ext : file extension of the directory listing entry.
|
||||
*
|
||||
* Parses a directory listing.
|
||||
*
|
||||
@ -120,7 +119,7 @@ static bool dirent_is_directory(const char *path)
|
||||
* continue to the next entry in the directory listing.
|
||||
**/
|
||||
static int parse_dir_entry(const char *name, char *file_path,
|
||||
bool is_dir, bool include_dirs, bool include_compressed,
|
||||
bool is_dir, bool include_dirs,
|
||||
struct string_list *list, struct string_list *ext_list,
|
||||
const char *file_ext)
|
||||
{
|
||||
@ -146,9 +145,6 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
if (!is_compressed_file && !is_dir && ext_list && !supported_by_core)
|
||||
return 1;
|
||||
|
||||
if (!include_compressed && !supported_by_core)
|
||||
return 1;
|
||||
|
||||
if (is_dir)
|
||||
attr.i = RARCH_DIRECTORY;
|
||||
if (is_compressed_file)
|
||||
@ -172,10 +168,9 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
|
||||
/**
|
||||
* dir_list_new:
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_compressed : Include compressed files, even if not part of ext.
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
*
|
||||
* Create a directory listing.
|
||||
*
|
||||
@ -183,7 +178,7 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
* NULL in case of error. Has to be freed manually.
|
||||
**/
|
||||
struct string_list *dir_list_new(const char *dir,
|
||||
const char *ext, bool include_dirs, bool include_compressed)
|
||||
const char *ext, bool include_dirs)
|
||||
{
|
||||
NSArray *entries = NULL;
|
||||
char path_buf[PATH_MAX_LENGTH] = {0};
|
||||
@ -212,7 +207,7 @@ struct string_list *dir_list_new(const char *dir,
|
||||
is_dir = dirent_is_directory(file_path);
|
||||
|
||||
ret = parse_dir_entry([name UTF8String], file_path, is_dir,
|
||||
include_dirs, include_compressed, list, ext_list, file_ext);
|
||||
include_dirs, list, ext_list, file_ext);
|
||||
|
||||
if (ret == -1)
|
||||
goto error;
|
||||
|
@ -31,10 +31,9 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* dir_list_new:
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
* @include_compressed : include compressed files, even when not part of ext.
|
||||
* @dir : directory path.
|
||||
* @ext : allowed extensions of file directory entries to include.
|
||||
* @include_dirs : include directories as part of the finished directory listing?
|
||||
*
|
||||
* Create a directory listing.
|
||||
*
|
||||
@ -42,7 +41,7 @@ extern "C" {
|
||||
* NULL in case of error. Has to be freed manually.
|
||||
**/
|
||||
struct string_list *dir_list_new(const char *dir, const char *ext,
|
||||
bool include_dirs, bool include_compressed);
|
||||
bool include_dirs);
|
||||
|
||||
/**
|
||||
* dir_list_sort:
|
||||
|
@ -2118,7 +2118,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
else
|
||||
str_list = dir_list_new(info->path,
|
||||
filter_ext ? info->exts : NULL,
|
||||
true, true);
|
||||
true);
|
||||
|
||||
if (hash_label == MENU_LABEL_SCAN_DIRECTORY)
|
||||
menu_list_push(info->list,
|
||||
|
Loading…
x
Reference in New Issue
Block a user