Add menu_navigation_browser_filter_supported_extensions_enable option

This commit is contained in:
twinaphex 2015-01-01 16:40:21 +01:00
parent 3830dbebaf
commit 6ca7e0561e
5 changed files with 31 additions and 1 deletions

View File

@ -301,6 +301,13 @@ struct settings
bool horizontal_enable;
bool vertical_enable;
} wraparound;
struct
{
struct
{
bool supported_extensions_enable;
} filter;
} browser;
} navigation;
} menu;
#endif

View File

@ -354,7 +354,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
if (path_is_compressed)
str_list = compressed_file_list_new(dir,exts);
else
str_list = dir_list_new(dir, exts, true);
str_list = dir_list_new(dir, g_settings.menu.navigation.browser.filter.supported_extensions_enable ? exts : NULL, true);
if (!str_list)
return -1;

View File

@ -567,6 +567,9 @@
# Wrap-around to beginning and/or end if boundary of list reached vertically
# menu_navigation_wraparound_vertical_enable = false
# Filter files being show in 'Load Content' by supported extensions
# menu_navigation_browser_filter_supported_extensions_enable = true
#### Camera
# Override the default camera device the camera driver uses. This is driver dependant.

View File

@ -435,6 +435,7 @@ static void config_set_defaults(void)
g_settings.menu.mouse_enable = false;
g_settings.menu.navigation.wraparound.horizontal_enable = true;
g_settings.menu.navigation.wraparound.vertical_enable = true;
g_settings.menu.navigation.browser.filter.supported_extensions_enable = true;
#endif
@ -902,6 +903,7 @@ static bool config_load_file(const char *path, bool set_defaults)
CONFIG_GET_BOOL(menu.mouse_enable, "menu_mouse_enable");
CONFIG_GET_BOOL(menu.navigation.wraparound.horizontal_enable, "menu_navigation_wraparound_horizontal_enable");
CONFIG_GET_BOOL(menu.navigation.wraparound.vertical_enable, "menu_navigation_wraparound_vertical_enable");
CONFIG_GET_BOOL(menu.navigation.browser.filter.supported_extensions_enable, "menu_navigation_browser_filter_supported_extensions_enable");
#endif
CONFIG_GET_INT(video.hard_sync_frames, "video_hard_sync_frames");
@ -1707,6 +1709,8 @@ bool config_save_file(const char *path)
g_settings.menu.navigation.wraparound.horizontal_enable);
config_set_bool(conf, "menu_navigation_wraparound_vertical_enable",
g_settings.menu.navigation.wraparound.vertical_enable);
config_set_bool(conf, "menu_navigation_browser_filter_supported_extensions_enable",
g_settings.menu.navigation.browser.filter.supported_extensions_enable);
#endif
config_set_path(conf, "game_history_path", g_settings.content_history_path);

View File

@ -4784,6 +4784,22 @@ static bool setting_data_append_list_menu_options(
END_SUB_GROUP(list, list_info);
START_SUB_GROUP(list, list_info, "Browser", group_info.name, subgroup_info);
CONFIG_BOOL(
g_settings.menu.navigation.browser.filter.supported_extensions_enable,
"menu_navigation_browser_filter_supported_extensions_enable",
"Load Content - Filter by supported extensions",
true,
"OFF",
"ON",
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler);
END_SUB_GROUP(list, list_info);
END_GROUP(list, list_info);
#endif