mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
(Desktop Menu) Prevent hidden settings for desktop menu -
add third parameter that when set to true, will include everything in the list - this way we can show greyed out settings
This commit is contained in:
parent
6164e33b07
commit
e55692d74f
@ -3841,13 +3841,73 @@ static int menu_displaylist_parse_disc_info(file_list_t *info_list,
|
||||
#endif
|
||||
|
||||
|
||||
unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ctl_state type)
|
||||
unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ctl_state type,
|
||||
bool include_everything)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned count = 0;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_displaylist_build_info_selective_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_HISTORY_LIST_ENABLE, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_CONTENT_FAVORITES_SIZE, PARSE_ONLY_INT, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SORT_ALPHABETICAL, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SHOW_INLINE_CORE_NAME, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SHOW_SUBLABELS, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_SCAN_WITHOUT_CORE_MATCH, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CONTENT_RUNTIME_LOG, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CONTENT_RUNTIME_LOG_AGGREGATE, PARSE_ONLY_BOOL, true},
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
switch (build_list[i].enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE:
|
||||
case MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE:
|
||||
if (settings->bools.playlist_show_sublabels)
|
||||
build_list[i].checked = true;
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE:
|
||||
if (settings->bools.history_list_enable)
|
||||
build_list[i].checked = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (menu_entries_append_enum(list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_LIST),
|
||||
MENU_ENUM_LABEL_PLAYLIST_MANAGER_LIST,
|
||||
MENU_SETTING_ACTION, 0, 0))
|
||||
count++;
|
||||
break;
|
||||
case DISPLAYLIST_INPUT_HAPTIC_FEEDBACK_SETTINGS_LIST:
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
MENU_ENUM_LABEL_VIBRATE_ON_KEYPRESS,
|
||||
@ -5480,8 +5540,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
@ -5970,8 +6032,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
@ -6055,9 +6119,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (
|
||||
build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
@ -6114,8 +6179,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
@ -6628,8 +6695,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
@ -6681,8 +6750,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
if (!build_list[i].checked && !include_everything)
|
||||
continue;
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
@ -8318,67 +8389,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
|
||||
info->need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_displaylist_build_info_selective_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_HISTORY_LIST_ENABLE, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_CONTENT_FAVORITES_SIZE, PARSE_ONLY_INT, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SORT_ALPHABETICAL, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SHOW_INLINE_CORE_NAME, PARSE_ONLY_UINT, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SHOW_SUBLABELS, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_SCAN_WITHOUT_CORE_MATCH, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CONTENT_RUNTIME_LOG, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_CONTENT_RUNTIME_LOG_AGGREGATE, PARSE_ONLY_BOOL, true},
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
switch (build_list[i].enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE:
|
||||
case MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE:
|
||||
if (settings->bools.playlist_show_sublabels)
|
||||
build_list[i].checked = true;
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE:
|
||||
if (settings->bools.history_list_enable)
|
||||
build_list[i].checked = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(info->list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_LIST),
|
||||
MENU_ENUM_LABEL_PLAYLIST_MANAGER_LIST,
|
||||
MENU_SETTING_ACTION, 0, 0))
|
||||
count++;
|
||||
|
||||
info->need_push = true;
|
||||
break;
|
||||
|
||||
case DISPLAYLIST_PLAYLIST_MANAGER_LIST:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
@ -8494,8 +8504,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
case DISPLAYLIST_SHADER_PRESET_REMOVE:
|
||||
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
||||
case DISPLAYLIST_INPUT_HAPTIC_FEEDBACK_SETTINGS_LIST:
|
||||
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
count = menu_displaylist_build_list(info->list, type);
|
||||
count = menu_displaylist_build_list(info->list, type, false);
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ bool menu_displaylist_push(menu_displaylist_ctx_entry_t *entry);
|
||||
|
||||
void menu_displaylist_info_free(menu_displaylist_info_t *info);
|
||||
|
||||
unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ctl_state type);
|
||||
unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ctl_state type, bool include_everything);
|
||||
|
||||
void menu_displaylist_info_init(menu_displaylist_info_t *info);
|
||||
|
||||
|
@ -31,7 +31,7 @@ QWidget *AchievementsPage::widget()
|
||||
{
|
||||
unsigned i;
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_RETRO_ACHIEVEMENTS_SETTINGS_LIST);
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_RETRO_ACHIEVEMENTS_SETTINGS_LIST, true);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ QWidget *InputPage::widget()
|
||||
{
|
||||
unsigned i;
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_INPUT_SETTINGS_LIST);
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_INPUT_SETTINGS_LIST, true);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
@ -77,7 +77,7 @@ QWidget *HotkeyBindsPage::widget()
|
||||
FormLayout *mainLayout = new FormLayout;
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST);
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST, true);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
|
@ -559,7 +559,7 @@ static inline QWidget *create_widget(enum menu_displaylist_ctl_state name)
|
||||
FormLayout *layout = new FormLayout;
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
|
||||
menu_displaylist_build_list(list, name);
|
||||
menu_displaylist_build_list(list, name, true);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ QWidget *ViewsPage::widget()
|
||||
unsigned tabs_begin = 0;
|
||||
unsigned status_begin = 0;
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST);
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST, true);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
@ -160,7 +160,7 @@ QWidget *ViewsPage::widget()
|
||||
{
|
||||
unsigned i;
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_SETTINGS_VIEWS_SETTINGS_LIST);
|
||||
menu_displaylist_build_list(list, DISPLAYLIST_SETTINGS_VIEWS_SETTINGS_LIST, true);
|
||||
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
@ -221,7 +221,7 @@ QWidget *AppearancePage::widget()
|
||||
file_list_t *list = (file_list_t*)calloc(1, sizeof(*list));
|
||||
|
||||
menu_displaylist_build_list(
|
||||
list, DISPLAYLIST_MENU_SETTINGS_LIST);
|
||||
list, DISPLAYLIST_MENU_SETTINGS_LIST, true);
|
||||
|
||||
/* TODO/FIXME - we haven't yet figured out how to
|
||||
* put a radio button setting next to another radio
|
||||
|
Loading…
x
Reference in New Issue
Block a user