Add search filter support to cheats and overlays file browser menus

This commit is contained in:
jdgleaver 2021-04-22 16:55:31 +01:00
parent 93e467913e
commit 80753ac741
3 changed files with 16 additions and 6 deletions

View File

@ -682,10 +682,7 @@ DEFAULT_TITLE_MACRO(action_get_title_dropdown_manual_content_scan_core_name_item
DEFAULT_TITLE_MACRO(action_get_title_dropdown_disk_index, MENU_ENUM_LABEL_VALUE_DISK_INDEX)
DEFAULT_FILL_TITLE_MACRO(action_get_title_disk_image_append, MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND)
DEFAULT_FILL_TITLE_MACRO(action_get_title_cheat_file_load, MENU_ENUM_LABEL_VALUE_CHEAT_FILE)
DEFAULT_FILL_TITLE_MACRO(action_get_title_cheat_file_load_append, MENU_ENUM_LABEL_VALUE_CHEAT_FILE_APPEND)
DEFAULT_FILL_TITLE_MACRO(action_get_title_remap_file_load, MENU_ENUM_LABEL_VALUE_REMAP_FILE)
DEFAULT_FILL_TITLE_MACRO(action_get_title_overlay, MENU_ENUM_LABEL_VALUE_OVERLAY_PRESET)
DEFAULT_FILL_TITLE_MACRO(action_get_title_video_filter, MENU_ENUM_LABEL_VALUE_VIDEO_FILTER)
DEFAULT_FILL_TITLE_MACRO(action_get_title_cheat_directory, MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH)
DEFAULT_FILL_TITLE_MACRO(action_get_title_core_directory, MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH)
@ -758,7 +755,10 @@ DEFAULT_TITLE_SEARCH_FILTER_MACRO(action_get_title_deferred_music_list, MENU
DEFAULT_TITLE_SEARCH_FILTER_MACRO(action_get_title_deferred_video_list, MENU_ENUM_LABEL_VALUE_GOTO_VIDEO)
DEFAULT_TITLE_SEARCH_FILTER_MACRO(action_get_core_updater_list, MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST)
DEFAULT_FILL_TITLE_SEARCH_FILTER_MACRO(action_get_title_video_shader_preset, MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_TWO)
DEFAULT_FILL_TITLE_SEARCH_FILTER_MACRO(action_get_title_video_shader_preset, MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_TWO)
DEFAULT_FILL_TITLE_SEARCH_FILTER_MACRO(action_get_title_cheat_file_load, MENU_ENUM_LABEL_VALUE_CHEAT_FILE)
DEFAULT_FILL_TITLE_SEARCH_FILTER_MACRO(action_get_title_cheat_file_load_append, MENU_ENUM_LABEL_VALUE_CHEAT_FILE_APPEND)
DEFAULT_FILL_TITLE_SEARCH_FILTER_MACRO(action_get_title_overlay, MENU_ENUM_LABEL_VALUE_OVERLAY_PRESET)
static int action_get_title_generic(char *s, size_t len, const char *path,
const char *text)

View File

@ -8361,7 +8361,12 @@ static void materialui_populate_entries(
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_LIST)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES));
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PASS)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INPUT_OVERLAY));
if (!mui->is_file_list)
mui->is_dropdown_list = string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST)) ||

View File

@ -4978,7 +4978,12 @@ bool menu_driver_search_filter_enabled(const char *label, unsigned type)
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES)) ||
/* > Shader presets/passes */
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PASS));
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PASS)) ||
/* > Cheat files */
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD)) ||
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND)) ||
/* > Overlays */
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INPUT_OVERLAY));
return filter_enabled;
}