mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +00:00
Prevent null representation entries
This commit is contained in:
parent
5fc6519328
commit
eb416ce478
@ -442,7 +442,8 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
|
||||
if (path && !use_representation)
|
||||
strlcpy(entry->path, path, sizeof(entry->path));
|
||||
|
||||
if (cbs && cbs->setting && cbs->setting->enum_value_idx != MSG_UNKNOWN)
|
||||
if (cbs && cbs->setting && cbs->setting->enum_value_idx != MSG_UNKNOWN
|
||||
&& !cbs->setting->dont_use_enum_idx_representation)
|
||||
strlcpy(entry->path, msg_hash_to_str(cbs->setting->enum_value_idx), sizeof(entry->path));
|
||||
|
||||
if (entry_label)
|
||||
|
@ -1458,6 +1458,7 @@ bool CONFIG_BOOL_ALT(
|
||||
(*list)[list_info->index++] = value;
|
||||
if (flags != SD_FLAG_NONE)
|
||||
settings_data_list_current_add_flags(list, list_info, flags);
|
||||
(*list)[list_info->index - 1].dont_use_enum_idx_representation = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1545,6 +1546,7 @@ bool CONFIG_UINT_ALT(
|
||||
if (value.name)
|
||||
value.name_hash = msg_hash_calculate(value.name);
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].dont_use_enum_idx_representation = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1790,6 +1792,7 @@ bool CONFIG_ACTION_ALT(
|
||||
if (value.name)
|
||||
value.name_hash = msg_hash_calculate(value.name);
|
||||
(*list)[list_info->index++] = value;
|
||||
(*list)[list_info->index - 1].dont_use_enum_idx_representation = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,8 @@ struct rarch_setting
|
||||
enum msg_hash_enums enum_value_idx;
|
||||
enum setting_type type;
|
||||
|
||||
bool dont_use_enum_idx_representation;
|
||||
|
||||
uint32_t size;
|
||||
|
||||
const char *name;
|
||||
|
Loading…
Reference in New Issue
Block a user