mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-24 10:24:55 +00:00
Implemented setting for showing/hiding the "Cheats" option in the Quick Menu.
This commit is contained in:
parent
d5a802e4a8
commit
a64683ba34
@ -242,6 +242,7 @@ static bool quick_menu_show_undo_save_load_state = true;
|
||||
static bool quick_menu_show_add_to_favorites = true;
|
||||
static bool quick_menu_show_options = true;
|
||||
static bool quick_menu_show_controls = true;
|
||||
static bool quick_menu_show_cheats = true;
|
||||
|
||||
static bool menu_show_online_updater = true;
|
||||
|
||||
|
@ -1197,6 +1197,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("quick_menu_show_add_to_favorites", &settings->bools.quick_menu_show_add_to_favorites, true, quick_menu_show_add_to_favorites, false);
|
||||
SETTING_BOOL("quick_menu_show_options", &settings->bools.quick_menu_show_options, true, quick_menu_show_options, false);
|
||||
SETTING_BOOL("quick_menu_show_controls", &settings->bools.quick_menu_show_controls, true, quick_menu_show_controls, false);
|
||||
SETTING_BOOL("quick_menu_show_cheats", &settings->bools.quick_menu_show_cheats, true, quick_menu_show_cheats, false);
|
||||
#ifdef HAVE_MATERIALUI
|
||||
SETTING_BOOL("materialui_icons_enable", &settings->bools.menu_materialui_icons_enable, true, materialui_icons_enable, false);
|
||||
#endif
|
||||
|
@ -144,6 +144,7 @@ typedef struct settings
|
||||
bool quick_menu_show_add_to_favorites;
|
||||
bool quick_menu_show_options;
|
||||
bool quick_menu_show_controls;
|
||||
bool quick_menu_show_cheats;
|
||||
|
||||
/* Netplay */
|
||||
bool netplay_public_announce;
|
||||
|
@ -3091,3 +3091,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3091,3 +3091,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3085,3 +3085,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -2954,3 +2954,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3123,3 +3123,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3177,3 +3177,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3093,3 +3093,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3086,3 +3086,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -1319,3 +1319,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS,
|
||||
"quick_menu_show_options")
|
||||
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"quick_menu_show_controls")
|
||||
MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"quick_menu_show_cheats")
|
||||
|
@ -2954,3 +2954,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -4030,3 +4030,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option."
|
||||
)
|
||||
|
@ -3061,3 +3061,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3144,3 +3144,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3179,3 +3179,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -3115,3 +3115,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show Controls")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
"Show/hide the 'Controls' option.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show Cheats")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
"Show/hide the 'Cheats' option.")
|
||||
|
@ -296,6 +296,7 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_show_undo_save_load_state
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_add_to_favorites, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_options, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_controls, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_show_cheats, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_XMB_SHOW_FAVORITES)
|
||||
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)
|
||||
@ -616,6 +617,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_controls);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quick_menu_show_cheats);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_XMB_SHOW_FAVORITES:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab);
|
||||
break;
|
||||
|
@ -2918,18 +2918,23 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
#ifdef HAVE_LAKKA
|
||||
if (show_advanced_settings)
|
||||
#endif
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS),
|
||||
MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
if ( (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (settings->bools.quick_menu_show_cheats)
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS),
|
||||
MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
}
|
||||
|
||||
if ((!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
&& system->disk_control_cb.get_num_images)
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_DISK_OPTIONS),
|
||||
MENU_ENUM_LABEL_DISK_OPTIONS,
|
||||
MENU_SETTING_ACTION_CORE_DISK_OPTIONS, 0, 0);
|
||||
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS),
|
||||
@ -5390,6 +5395,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
break;
|
||||
|
@ -5926,6 +5926,21 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.quick_menu_show_cheats,
|
||||
MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS,
|
||||
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS,
|
||||
quick_menu_show_cheats,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
if (string_is_not_equal_fast(ui_companion_driver_get_ident(), "null", 4))
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
|
@ -715,6 +715,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(QUICK_MENU_SHOW_ADD_TO_FAVORITES),
|
||||
MENU_LABEL(QUICK_MENU_SHOW_OPTIONS),
|
||||
MENU_LABEL(QUICK_MENU_SHOW_CONTROLS),
|
||||
MENU_LABEL(QUICK_MENU_SHOW_CHEATS),
|
||||
|
||||
/* UI settings */
|
||||
MENU_LABEL(VIDEO_DISABLE_COMPOSITION),
|
||||
|
Loading…
x
Reference in New Issue
Block a user