mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 10:20:21 +00:00
Make 'Scan File' work
This commit is contained in:
parent
6f268d7dff
commit
26b55ed2d2
@ -834,6 +834,12 @@ static int action_ok_path_use_directory(const char *path,
|
||||
return menu_entry_pathdir_set_value(0, NULL);
|
||||
}
|
||||
|
||||
static int action_ok_scan_file(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
return action_scan_file(path, label, type, idx);
|
||||
}
|
||||
|
||||
static int action_ok_path_scan_directory(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -1982,6 +1988,9 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_PLAIN:
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_LABEL_SCAN_FILE:
|
||||
cbs->action_ok = action_ok_scan_file;
|
||||
break;
|
||||
case MENU_LABEL_DETECT_CORE_LIST:
|
||||
#ifdef HAVE_COMPRESSION
|
||||
if (type == MENU_FILE_IN_CARCHIVE)
|
||||
|
@ -1862,7 +1862,7 @@ static int menu_displaylist_parse_options_remappings(menu_displaylist_info_t *in
|
||||
|
||||
static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *need_sort)
|
||||
{
|
||||
bool path_is_compressed, push_dir;
|
||||
bool path_is_compressed, push_dir, filter_ext;
|
||||
size_t i, list_size;
|
||||
struct string_list *str_list = NULL;
|
||||
int device = 0;
|
||||
@ -1896,12 +1896,17 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
push_dir = (info->setting
|
||||
&& info->setting->browser_selection_type == ST_DIR);
|
||||
|
||||
filter_ext = settings->menu.navigation.browser.filter.supported_extensions_enable;
|
||||
|
||||
if (hash_label == MENU_LABEL_SCAN_FILE)
|
||||
filter_ext = false;
|
||||
|
||||
if (path_is_compressed)
|
||||
str_list = compressed_file_list_new(info->path, info->exts);
|
||||
else
|
||||
str_list = dir_list_new(info->path,
|
||||
settings->menu.navigation.browser.filter.supported_extensions_enable
|
||||
? info->exts : NULL, true);
|
||||
filter_ext ? info->exts : NULL,
|
||||
true);
|
||||
|
||||
if (hash_label == MENU_LABEL_SCAN_DIRECTORY)
|
||||
menu_list_push(info->list,
|
||||
|
Loading…
Reference in New Issue
Block a user