Add 'Show Core Updater'

This commit is contained in:
twinaphex 2017-06-20 02:22:07 +02:00
parent c2c2e0cdc9
commit 540b9d5615
22 changed files with 97 additions and 10 deletions

View File

@ -232,6 +232,8 @@ static bool default_block_config_read = true;
static bool menu_show_online_updater = true;
static bool menu_show_core_updater = true;
#ifdef HAVE_XMB
static unsigned xmb_scale_factor = 100;
static unsigned xmb_alpha_factor = 75;

View File

@ -1190,6 +1190,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
#endif
SETTING_BOOL("xmb_show_music", &settings->bools.menu_xmb_show_music, true, xmb_show_music, false);
SETTING_BOOL("menu_show_online_updater", &settings->bools.menu_show_online_updater, true, menu_show_online_updater, false);
SETTING_BOOL("menu_show_core_updater", &settings->bools.menu_show_core_updater, true, menu_show_core_updater, false);
#ifdef HAVE_FFMPEG
SETTING_BOOL("xmb_show_video", &settings->bools.menu_xmb_show_video, true, xmb_show_video, false);
#endif

View File

@ -120,6 +120,7 @@ typedef struct settings
bool menu_throttle_framerate;
bool menu_linear_filter;
bool menu_show_online_updater;
bool menu_show_core_updater;
bool menu_xmb_shadows_enable;
bool menu_xmb_show_settings;
bool menu_xmb_show_images;

View File

@ -3005,3 +3005,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2999,3 +2999,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2864,3 +2864,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2985,3 +2985,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2307,3 +2307,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2957,3 +2957,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -3000,3 +3000,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -1241,3 +1241,5 @@ MSG_HASH(MENU_ENUM_LABEL_AUDIO_MIXER_MUTE,
"audio_mixer_mute_enable")
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"menu_show_online_updater")
MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER,
"menu_show_core_updater")

View File

@ -2868,3 +2868,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2977,3 +2977,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2975,3 +2975,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -2866,3 +2866,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -3047,3 +3047,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS,
"Show or hide elements on the menu screen."
)
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -3035,3 +3035,7 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
"Show Online Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
"Show/hide the 'Online Updater' option.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
"Show Core Updater")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER,
"Show/hide the ability to update cores (and core info files).")

View File

@ -275,6 +275,7 @@ default_sublabel_macro(action_bind_sublabel_menu_ribbon_enable,
default_sublabel_macro(action_bind_sublabel_menu_font, MENU_ENUM_SUBLABEL_XMB_FONT)
default_sublabel_macro(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_IMAGES)
default_sublabel_macro(action_bind_sublabel_menu_show_online_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER)
default_sublabel_macro(action_bind_sublabel_menu_show_core_updater, MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER)
default_sublabel_macro(action_bind_sublabel_menu_music_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_MUSIC)
default_sublabel_macro(action_bind_sublabel_menu_video_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_VIDEO)
default_sublabel_macro(action_bind_sublabel_menu_netplay_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_NETPLAY)
@ -545,6 +546,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_online_updater);
break;
case MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_show_core_updater);
break;
case MENU_ENUM_LABEL_XMB_SHOW_NETPLAY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_netplay_tab);
break;

View File

@ -3147,6 +3147,7 @@ static int menu_displaylist_parse_options(
menu_displaylist_info_t *info)
{
#ifdef HAVE_NETWORKING
settings_t *settings = config_get_ptr();
#ifdef HAVE_LAKKA
menu_entries_append_enum(info->list,
@ -3168,11 +3169,12 @@ static int menu_displaylist_parse_options(
MENU_SETTING_ACTION, 0, 0);
#else
#if !defined(VITA)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST),
MENU_ENUM_LABEL_CORE_UPDATER_LIST,
MENU_SETTING_ACTION, 0, 0);
if (settings->bools.menu_show_core_updater)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_CORE_UPDATER_LIST),
MENU_ENUM_LABEL_CORE_UPDATER_LIST,
MENU_SETTING_ACTION, 0, 0);
#endif
menu_entries_append_enum(info->list,
@ -3190,11 +3192,12 @@ static int menu_displaylist_parse_options(
#endif
#if !defined(VITA)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UPDATE_CORE_INFO_FILES),
msg_hash_to_str(MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES),
MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES,
MENU_SETTING_ACTION, 0, 0);
if (settings->bools.menu_show_core_updater)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UPDATE_CORE_INFO_FILES),
msg_hash_to_str(MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES),
MENU_ENUM_LABEL_UPDATE_CORE_INFO_FILES,
MENU_SETTING_ACTION, 0, 0);
#endif
#ifdef HAVE_UPDATE_ASSETS
@ -4997,6 +5000,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_XMB_SHOW_SETTINGS,
PARSE_ONLY_BOOL, false);

View File

@ -5668,6 +5668,21 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_show_core_updater,
MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER,
MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
menu_show_online_updater,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4))

View File

@ -654,6 +654,7 @@ enum msg_hash_enums
/* Menu settings */
MENU_LABEL(MENU_SHOW_ONLINE_UPDATER),
MENU_LABEL(MENU_SHOW_CORE_UPDATER),
MENU_LABEL(RUN_MUSIC),
MENU_LABEL(RUN),
MENU_LABEL(MENU_WALLPAPER),

View File

@ -654,6 +654,9 @@
# If disabled, will hide 'Online Updater' inside the menu.
# menu_show_online_updater = true
# If disabled, will hide the ability to update cores (and core info files) inside the menu.
# menu_show_core_updater = true
# If disabled, the libretro core will keep running in the background when we
# are in the menu.
# menu_pause_libretro = false