mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
Start using menu_setting_find_prehashed
This commit is contained in:
parent
552959933d
commit
7cc6c477b8
@ -360,7 +360,17 @@ static int general_push(menu_displaylist_info_t *info,
|
|||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case PUSH_ARCHIVE_OPEN_DETECT_CORE:
|
case PUSH_ARCHIVE_OPEN_DETECT_CORE:
|
||||||
info->setting = menu_setting_find(info->label);
|
case PUSH_ARCHIVE_OPEN:
|
||||||
|
case PUSH_DEFAULT:
|
||||||
|
info->setting = menu_setting_find_prehashed(info->label, info->label_hash);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case PUSH_ARCHIVE_OPEN_DETECT_CORE:
|
||||||
|
|
||||||
if (!string_is_empty(list->all_ext))
|
if (!string_is_empty(list->all_ext))
|
||||||
strlcpy(info->exts, list->all_ext, sizeof(info->exts));
|
strlcpy(info->exts, list->all_ext, sizeof(info->exts));
|
||||||
@ -374,7 +384,6 @@ static int general_push(menu_displaylist_info_t *info,
|
|||||||
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
||||||
break;
|
break;
|
||||||
case PUSH_ARCHIVE_OPEN:
|
case PUSH_ARCHIVE_OPEN:
|
||||||
info->setting = menu_setting_find(info->label);
|
|
||||||
if (system_menu->valid_extensions)
|
if (system_menu->valid_extensions)
|
||||||
{
|
{
|
||||||
if (*system_menu->valid_extensions)
|
if (*system_menu->valid_extensions)
|
||||||
@ -385,7 +394,6 @@ static int general_push(menu_displaylist_info_t *info,
|
|||||||
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
||||||
break;
|
break;
|
||||||
case PUSH_DEFAULT:
|
case PUSH_DEFAULT:
|
||||||
info->setting = menu_setting_find(info->label);
|
|
||||||
if (menu_setting_get_browser_selection_type(info->setting) == ST_DIR)
|
if (menu_setting_get_browser_selection_type(info->setting) == ST_DIR)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -1937,6 +1937,18 @@ rarch_setting_t *menu_setting_find(const char *label)
|
|||||||
return menu_setting_find_internal(setting, label, needle);
|
return menu_setting_find_internal(setting, label, needle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rarch_setting_t *menu_setting_find_prehashed(const char *label, uint32_t needle)
|
||||||
|
{
|
||||||
|
rarch_setting_t *setting = NULL;
|
||||||
|
|
||||||
|
menu_entries_ctl(MENU_ENTRIES_CTL_SETTINGS_GET, &setting);
|
||||||
|
|
||||||
|
if (!setting || !label)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return menu_setting_find_internal(setting, label, needle);
|
||||||
|
}
|
||||||
|
|
||||||
int menu_setting_set_flags(rarch_setting_t *setting)
|
int menu_setting_set_flags(rarch_setting_t *setting)
|
||||||
{
|
{
|
||||||
if (!setting)
|
if (!setting)
|
||||||
|
@ -280,6 +280,8 @@ int menu_setting_set(unsigned type, const char *label,
|
|||||||
**/
|
**/
|
||||||
rarch_setting_t *menu_setting_find(const char *label);
|
rarch_setting_t *menu_setting_find(const char *label);
|
||||||
|
|
||||||
|
rarch_setting_t *menu_setting_find_prehashed(const char *label, uint32_t needle);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setting_set_with_string_representation:
|
* setting_set_with_string_representation:
|
||||||
* @setting : pointer to setting
|
* @setting : pointer to setting
|
||||||
|
Loading…
x
Reference in New Issue
Block a user