From ad71451432b0adb66deb56538eb3dc53c834b169 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 20 Aug 2019 01:18:26 +0200 Subject: [PATCH] Add frontend log level setting --- config.def.h | 3 +++ configuration.c | 1 + configuration.h | 1 + intl/msg_hash_ar.h | 8 ++++++++ intl/msg_hash_chs.h | 8 ++++++++ intl/msg_hash_cht.h | 8 ++++++++ intl/msg_hash_de.h | 8 ++++++++ intl/msg_hash_el.h | 8 ++++++++ intl/msg_hash_eo.h | 8 ++++++++ intl/msg_hash_es.h | 8 ++++++++ intl/msg_hash_fr.h | 8 ++++++++ intl/msg_hash_it.h | 8 ++++++++ intl/msg_hash_ja.h | 8 ++++++++ intl/msg_hash_ko.h | 8 ++++++++ intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_nl.h | 8 ++++++++ intl/msg_hash_pl.h | 8 ++++++++ intl/msg_hash_pt_br.h | 8 ++++++++ intl/msg_hash_pt_pt.h | 8 ++++++++ intl/msg_hash_ru.h | 8 ++++++++ intl/msg_hash_tr.h | 8 ++++++++ intl/msg_hash_us.h | 8 ++++++++ intl/msg_hash_vn.h | 8 ++++++++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ menu/menu_displaylist.c | 1 + menu/menu_setting.c | 18 ++++++++++++++++++ msg_hash.h | 1 + 27 files changed, 183 insertions(+) diff --git a/config.def.h b/config.def.h index 187e45d79f..e1d96d55a7 100644 --- a/config.def.h +++ b/config.def.h @@ -829,6 +829,9 @@ static const bool default_menu_show_start_screen = true; #define DEFAULT_MENU_DPI_OVERRIDE_VALUE 200 #endif +/* Log level for the frontend */ +#define DEFAULT_FRONTEND_LOG_LEVEL 1 + /* Log level for libretro cores (GET_LOG_INTERFACE). */ #define DEFAULT_LIBRETRO_LOG_LEVEL 1 diff --git a/configuration.c b/configuration.c index eb85b8c4f7..c51a5a5e6c 100644 --- a/configuration.c +++ b/configuration.c @@ -1706,6 +1706,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings, SETTING_UINT("rewind_granularity", &settings->uints.rewind_granularity, true, DEFAULT_REWIND_GRANULARITY, false); SETTING_UINT("rewind_buffer_size_step", &settings->uints.rewind_buffer_size_step, true, DEFAULT_REWIND_BUFFER_SIZE_STEP, false); SETTING_UINT("autosave_interval", &settings->uints.autosave_interval, true, DEFAULT_AUTOSAVE_INTERVAL, false); + SETTING_UINT("frontend_log_level", &settings->uints.frontend_log_level, true, DEFAULT_FRONTEND_LOG_LEVEL, false); SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, DEFAULT_LIBRETRO_LOG_LEVEL, false); SETTING_UINT("keyboard_gamepad_mapping_type",&settings->uints.input_keyboard_gamepad_mapping_type, true, 1, false); SETTING_UINT("input_poll_type_behavior", &settings->uints.input_poll_type_behavior, true, 2, false); diff --git a/configuration.h b/configuration.h index 39c4965042..f4f3c38c26 100644 --- a/configuration.h +++ b/configuration.h @@ -434,6 +434,7 @@ typedef struct settings unsigned bundle_assets_extract_version_current; unsigned bundle_assets_extract_last_version; unsigned content_history_size; + unsigned frontend_log_level; unsigned libretro_log_level; unsigned rewind_granularity; unsigned rewind_buffer_size_step; diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index 3c817f5bc7..3f8593862e 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -3818,3 +3818,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index fd51413317..eb8977ac60 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -4836,3 +4836,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 48ea2334b2..a627d7f2fd 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -3594,3 +3594,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index e818681850..d198de1a2e 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -3723,3 +3723,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_el.h b/intl/msg_hash_el.h index afd99e3457..607df923af 100644 --- a/intl/msg_hash_el.h +++ b/intl/msg_hash_el.h @@ -7800,3 +7800,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 32e94bcb72..62bf20f4c7 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -3482,3 +3482,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index 2848fb0417..d6d3c44b02 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -7952,3 +7952,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 85f5cc3c84..3d0ed057a6 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -8740,3 +8740,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index aa7c24ae87..44bbd18e8c 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -3703,3 +3703,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DISC_INFORMATION, "Informazioni sul disco") MSG_HASH(MENU_ENUM_SUBLABEL_DISC_INFORMATION, "Visualizza le informazioni sui dischi multimediali inseriti.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index e15eb6a44b..561df4a7f2 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -9115,3 +9115,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SET_CORE_ASSOCIATION, "コアの関連付けを設定" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index de358b5115..b04afabe1b 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -8947,3 +8947,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 71b9a1bf7c..c5ae27003b 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -661,6 +661,8 @@ MSG_HASH(MENU_ENUM_LABEL_LIBRETRO_DIR_PATH, "libretro_dir_path") MSG_HASH(MENU_ENUM_LABEL_LIBRETRO_INFO_PATH, "libretro_info_path") +MSG_HASH(MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL, + "frontend_log_level") MSG_HASH(MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL, "libretro_log_level") MSG_HASH(MENU_ENUM_LABEL_LOAD_ARCHIVE, diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index d17e9a3a10..454f7341e1 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -3476,3 +3476,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index 0da6348737..2ac0268eb9 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -4267,3 +4267,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD_APPEND, "Załaduj plik kodów i dołącz do istniejących kodów." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 0abd011d8b..e5cf243240 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -9027,3 +9027,11 @@ MSG_HASH( MSG_INCOMPATIBLE_CORE_FOR_VIDEO_DRIVER, "Este núcleo não é compatível com o driver de vídeo atual." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index d78fa69b4a..92d6ce313d 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -3548,3 +3548,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 9bf7e31d45..ddb5d1f0b4 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -3746,3 +3746,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_tr.h b/intl/msg_hash_tr.h index e6dc3c6651..411a5d5955 100644 --- a/intl/msg_hash_tr.h +++ b/intl/msg_hash_tr.h @@ -8752,3 +8752,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "Takılan medya diskleri hakkındaki bilgileri görüntüleyin." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 2bd0065293..549e6e5d6a 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -9075,3 +9075,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_RESET_ALL, "Reset All" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 17625fce23..1cdac2649f 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -3638,3 +3638,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISC_INFORMATION, "View information about inserted media discs." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + "Frontend Logging Level" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, + "Sets log level for the frontend. If a log level issued by the frontend is below this value, it is ignored." + ) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index a98dbac378..5715c87613 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -315,6 +315,7 @@ default_sublabel_macro(action_bind_sublabel_cheat_reload_cheats, MENU_ default_sublabel_macro(action_bind_sublabel_cheat_address_bit_position, MENU_ENUM_SUBLABEL_CHEAT_ADDRESS_BIT_POSITION) default_sublabel_macro(action_bind_sublabel_cheat_delete_all, MENU_ENUM_SUBLABEL_CHEAT_DELETE_ALL) default_sublabel_macro(action_bind_sublabel_libretro_log_level, MENU_ENUM_SUBLABEL_LIBRETRO_LOG_LEVEL) +default_sublabel_macro(action_bind_sublabel_frontend_log_level, MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL) default_sublabel_macro(action_bind_sublabel_perfcnt_enable, MENU_ENUM_SUBLABEL_PERFCNT_ENABLE) default_sublabel_macro(action_bind_sublabel_savestate_auto_save, MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE) default_sublabel_macro(action_bind_sublabel_savestate_auto_load, MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD) @@ -1960,6 +1961,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_PERFCNT_ENABLE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_perfcnt_enable); break; + case MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_frontend_log_level); + break; case MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_libretro_log_level); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 2114faae3c..3642616bb7 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5068,6 +5068,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct { menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_LOG_VERBOSITY, PARSE_ONLY_BOOL}, + {MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL, PARSE_ONLY_UINT}, {MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL, PARSE_ONLY_UINT}, {MENU_ENUM_LABEL_LOG_TO_FILE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_LOG_TO_FILE_TIMESTAMP, PARSE_ONLY_BOOL}, diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 4cc7f4b31e..0603318431 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -7582,6 +7582,24 @@ static bool setting_append_list( general_read_handler, SD_FLAG_ADVANCED); + CONFIG_UINT( + list, list_info, + &settings->uints.frontend_log_level, + MENU_ENUM_LABEL_FRONTEND_LOG_LEVEL, + MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, + DEFAULT_FRONTEND_LOG_LEVEL, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_RADIO_BUTTONS; + (*list)[list_info->index - 1].action_ok = &setting_action_ok_uint; + 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, &settings->uints.libretro_log_level, diff --git a/msg_hash.h b/msg_hash.h index a48706075b..b61f37d37d 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1536,6 +1536,7 @@ enum msg_hash_enums MENU_LABEL(STATE_SLOT_DECREASE), MENU_LABEL(STATE_SLOT_INCREASE), + MENU_LABEL(FRONTEND_LOG_LEVEL), MENU_LABEL(LIBRETRO_LOG_LEVEL), MENU_LABEL(AUTOSAVE_INTERVAL), MENU_LABEL(CONFIG_SAVE_ON_EXIT),