Add 'Filter by current core'

This commit is contained in:
twinaphex 2017-06-01 00:25:13 +02:00
parent 973600ab30
commit cc1954b4ac
8 changed files with 41 additions and 18 deletions

View File

@ -1200,6 +1200,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("xmb_show_add", &settings->bools.menu_xmb_show_add, true, xmb_show_add, false);
#endif
#endif
SETTING_BOOL("filter_by_current_core", &settings->bools.filter_by_current_core, false, false /* TODO */, false);
SETTING_BOOL("rgui_show_start_screen", &settings->bools.menu_show_start_screen, false, false /* TODO */, false);
SETTING_BOOL("menu_navigation_wraparound_enable", &settings->bools.menu_navigation_wraparound_enable, true, true, false);
SETTING_BOOL("menu_navigation_browser_filter_supported_extensions_enable",

View File

@ -102,6 +102,7 @@ typedef struct settings
#ifdef HAVE_MENU
/* Menu */
bool filter_by_current_core;
bool menu_show_start_screen;
bool menu_pause_libretro;
bool menu_timedate_enable;

View File

@ -1229,3 +1229,5 @@ MSG_HASH(MENU_ENUM_LABEL_ADD_TO_MIXER,
"audio_add_to_mixer")
MSG_HASH(MENU_ENUM_LABEL_ADD_TO_MIXER_AND_COLLECTION,
"audio_add_to_mixer_and_collection")
MSG_HASH(MENU_ENUM_LABEL_FILTER_BY_CURRENT_CORE,
"filter_by_current_Core")

View File

@ -3015,3 +3015,5 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER,
"Add to mixer")
MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_COLLECTION,
"Add to mixer")
MSG_HASH(MENU_ENUM_LABEL_VALUE_FILTER_BY_CURRENT_CORE,
"Filter by current core")

View File

@ -706,7 +706,7 @@ static int general_push(menu_displaylist_info_t *info,
}
}
if (menu_entries_current_core_is_no_core())
if (!settings->bools.filter_by_current_core)
{
if (list && !string_is_empty(list->all_ext))
{

View File

@ -4972,6 +4972,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_USE_BUILTIN_PLAYER,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_FILTER_BY_CURRENT_CORE,
PARSE_ONLY_BOOL, false);
info->need_refresh = true;
info->need_push = true;
break;

View File

@ -5467,23 +5467,20 @@ static bool setting_append_list(
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
if (string_is_not_equal_fast(settings->arrays.record_driver, "null", 4))
{
CONFIG_BOOL(
list, list_info,
&settings->bools.multimedia_builtin_mediaplayer_enable,
MENU_ENUM_LABEL_USE_BUILTIN_PLAYER,
MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER,
true,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
}
CONFIG_BOOL(
list, list_info,
&settings->bools.multimedia_builtin_mediaplayer_enable,
MENU_ENUM_LABEL_USE_BUILTIN_PLAYER,
MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER,
true,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#ifdef HAVE_IMAGEVIEWER
@ -5503,6 +5500,21 @@ static bool setting_append_list(
SD_FLAG_NONE);
#endif
CONFIG_BOOL(
list, list_info,
&settings->bools.filter_by_current_core,
MENU_ENUM_LABEL_FILTER_BY_CURRENT_CORE,
MENU_ENUM_LABEL_VALUE_FILTER_BY_CURRENT_CORE,
true,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;

View File

@ -380,6 +380,8 @@ enum msg_hash_enums
MENU_LABEL(ADD_TO_MIXER_AND_COLLECTION),
MENU_ENUM_LABEL_MENU_TOGGLE,
MENU_LABEL(FILTER_BY_CURRENT_CORE),
MENU_LABEL(NO_HISTORY_AVAILABLE),
MENU_ENUM_LABEL_VALUE_REMAP_FILE,