mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Start wrapping more settings code
This commit is contained in:
parent
8223c3d2d3
commit
83dd151579
@ -738,7 +738,8 @@ int menu_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
|
||||
if (cbs->setting)
|
||||
{
|
||||
uint32_t parent_group_hash = menu_hash_calculate(cbs->setting->parent_group);
|
||||
const char *parent_group = menu_setting_get_parent_group(cbs->setting);
|
||||
uint32_t parent_group_hash = menu_hash_calculate(parent_group);
|
||||
|
||||
if ((parent_group_hash == MENU_VALUE_MAIN_MENU) && menu_setting_get_type(cbs->setting) == ST_GROUP)
|
||||
{
|
||||
|
@ -331,7 +331,8 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
|
||||
if (cbs->setting)
|
||||
{
|
||||
uint32_t parent_group_hash = menu_hash_calculate(cbs->setting->parent_group);
|
||||
const char *parent_group = menu_setting_get_parent_group(cbs->setting);
|
||||
uint32_t parent_group_hash = menu_hash_calculate(parent_group);
|
||||
|
||||
if ((parent_group_hash == MENU_VALUE_MAIN_MENU) && (menu_setting_get_type(cbs->setting) == ST_GROUP))
|
||||
{
|
||||
|
@ -438,7 +438,8 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||
|
||||
if (cbs->setting)
|
||||
{
|
||||
uint32_t parent_group_hash = menu_hash_calculate(cbs->setting->parent_group);
|
||||
const char *parent_group = menu_setting_get_parent_group(cbs->setting);
|
||||
uint32_t parent_group_hash = menu_hash_calculate(parent_group);
|
||||
|
||||
if ((parent_group_hash == MENU_LABEL_SETTINGS) && (menu_setting_get_type(cbs->setting) == ST_GROUP))
|
||||
{
|
||||
|
@ -459,7 +459,8 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
if (cbs->setting)
|
||||
{
|
||||
uint32_t parent_group_hash = menu_hash_calculate(cbs->setting->parent_group);
|
||||
const char *parent_group = menu_setting_get_parent_group(cbs->setting);
|
||||
uint32_t parent_group_hash = menu_hash_calculate(parent_group);
|
||||
|
||||
if ((parent_group_hash == MENU_VALUE_MAIN_MENU) && menu_setting_get_type(cbs->setting) == ST_GROUP)
|
||||
{
|
||||
|
@ -256,7 +256,7 @@ int generic_menu_iterate(enum menu_action action)
|
||||
if (setting)
|
||||
{
|
||||
char needle[PATH_MAX_LENGTH];
|
||||
strlcpy(needle, setting->name, sizeof(needle));
|
||||
strlcpy(needle, menu_setting_get_name(setting), sizeof(needle));
|
||||
label_hash = menu_hash_calculate(needle);
|
||||
}
|
||||
|
||||
|
@ -267,6 +267,13 @@ const char *menu_setting_get_name(rarch_setting_t *setting)
|
||||
return setting->name;
|
||||
}
|
||||
|
||||
const char *menu_setting_get_parent_group(rarch_setting_t *setting)
|
||||
{
|
||||
if (!setting)
|
||||
return NULL;
|
||||
return setting->parent_group;
|
||||
}
|
||||
|
||||
const char *menu_setting_get_short_description(rarch_setting_t *setting)
|
||||
{
|
||||
if (!setting)
|
||||
@ -6365,6 +6372,7 @@ static bool setting_append_list_input_player_options(
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void menu_setting_free(rarch_setting_t *list)
|
||||
{
|
||||
rarch_setting_t *setting = list;
|
||||
|
@ -292,6 +292,8 @@ const char *menu_setting_get_short_description(rarch_setting_t *setting);
|
||||
|
||||
uint64_t menu_setting_get_flags(rarch_setting_t *setting);
|
||||
|
||||
const char *menu_setting_get_parent_group(rarch_setting_t *setting);
|
||||
|
||||
double menu_setting_get_min(rarch_setting_t *setting);
|
||||
|
||||
double menu_setting_get_max(rarch_setting_t *setting);
|
||||
|
Loading…
Reference in New Issue
Block a user