Hide Logging Verbosity levels behind Logging Verbosity

This commit is contained in:
twinaphex 2019-12-24 04:18:38 +01:00
parent a19da4bf22
commit abb1b28e96
2 changed files with 22 additions and 7 deletions

View File

@ -6756,8 +6756,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
settings_t *settings = config_get_ptr();
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_LOG_VERBOSITY, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL, PARSE_ONLY_UINT, true},
{MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL, PARSE_ONLY_UINT, true},
{MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL, PARSE_ONLY_UINT, false},
{MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL, PARSE_ONLY_UINT, false},
{MENU_ENUM_LABEL_LOG_TO_FILE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_LOG_TO_FILE_TIMESTAMP, PARSE_ONLY_BOOL, false},
{MENU_ENUM_LABEL_PERFCNT_ENABLE, PARSE_ONLY_BOOL, true},
@ -6765,9 +6765,23 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
for (i = 0; i < ARRAY_SIZE(build_list); i++)
{
if (settings->bools.log_to_file &&
build_list[i].enum_idx == MENU_ENUM_LABEL_LOG_TO_FILE_TIMESTAMP)
build_list[i].checked = true;
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL:
case MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL:
{
bool *verbosity = verbosity_get_ptr();
if (verbosity && *verbosity)
build_list[i].checked = true;
}
break;
case MENU_ENUM_LABEL_LOG_TO_FILE_TIMESTAMP:
if (settings->bools.log_to_file)
build_list[i].checked = true;
break;
default:
break;
}
}
for (i = 0; i < ARRAY_SIZE(build_list); i++)

View File

@ -8397,6 +8397,9 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
CONFIG_UINT(
list, list_info,
@ -8415,7 +8418,6 @@ static bool setting_append_list(
menu_settings_list_current_add_range(list, list_info, 0, 3, 1.0, true, true);
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_libretro_log_level;
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_ADVANCED);
CONFIG_UINT(
list, list_info,
@ -8433,7 +8435,6 @@ static bool setting_append_list(
menu_settings_list_current_add_range(list, list_info, 0, 3, 1.0, true, true);
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_libretro_log_level;
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_ADVANCED);
CONFIG_BOOL(
list, list_info,