(menu_setting.c) Wrap browser_selection_type

This commit is contained in:
twinaphex 2015-10-11 13:16:38 +02:00
parent 83dd151579
commit 16f89fcd10
5 changed files with 14 additions and 4 deletions

View File

@ -358,7 +358,9 @@ static int general_push(menu_displaylist_info_t *info, unsigned id, unsigned typ
break;
case PUSH_DEFAULT:
info->setting = menu_setting_find(info->label);
if (info->setting && info->setting->browser_selection_type == ST_DIR) {}
if (menu_setting_get_browser_selection_type(info->setting) == ST_DIR)
{
}
else if (global->menu.info.valid_extensions)
{
if (*global->menu.info.valid_extensions)

View File

@ -1731,7 +1731,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
return 0;
}
if (cbs->setting && cbs->setting->browser_selection_type == ST_DIR)
if (menu_setting_get_browser_selection_type(cbs->setting) == ST_DIR)
{
cbs->action_ok = action_ok_push_generic_list;
return 0;

View File

@ -2189,8 +2189,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
}
path_is_compressed = path_is_compressed_file(info->path);
push_dir = (info->setting
&& info->setting->browser_selection_type == ST_DIR);
push_dir = (menu_setting_get_browser_selection_type(info->setting) == ST_DIR);
filter_ext = settings->menu.navigation.browser.filter.supported_extensions_enable;

View File

@ -51,6 +51,13 @@ enum setting_type menu_setting_get_type(rarch_setting_t *setting)
return setting->type;
}
enum setting_type menu_setting_get_browser_selection_type(rarch_setting_t *setting)
{
if (!setting)
return ST_NONE;
return setting->browser_selection_type;
}
static void menu_settings_info_list_free(rarch_setting_info_t *list_info)
{
if (list_info)

View File

@ -284,6 +284,8 @@ int menu_action_handle_setting(rarch_setting_t *setting,
enum setting_type menu_setting_get_type(rarch_setting_t *setting);
enum setting_type menu_setting_get_browser_selection_type(rarch_setting_t *setting);
const char *menu_setting_get_values(rarch_setting_t *setting);
const char *menu_setting_get_name(rarch_setting_t *setting);