New Menu Items for disabling Info & Search buttons in the menu (#14259)

* New Menu Items Disable Info & Search

Add menu options for disabling Info and   Search buttons

* Update msg_hash_us.h

Update Sublabels

* Update menu_setting.c

Set Advanced flag for new settings
This commit is contained in:
tr12345 2022-09-12 17:17:24 -04:00 committed by GitHub
parent 36d60f6bf4
commit 8cc866b051
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 86 additions and 2 deletions

View file

@ -1766,6 +1766,8 @@ static struct config_bool_setting *populate_settings_bool(
#endif
#ifdef HAVE_MENU
SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false);
SETTING_BOOL("menu_disable_info_button", &settings->bools.menu_disable_info_button, true, false, false);
SETTING_BOOL("menu_disable_search_button", &settings->bools.menu_disable_search_button, true, false, false);
SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false);
SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, DEFAULT_VIDEO_SMOOTH, false);
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, DEFAULT_MENU_HORIZONTAL_ANIMATION, false);

View file

@ -717,6 +717,8 @@ typedef struct settings
bool menu_use_preferred_system_color_theme;
bool menu_preferred_system_color_theme_set;
bool menu_unified_controls;
bool menu_disable_info_button;
bool menu_disable_search_button;
bool menu_ticker_smooth;
bool settings_show_drivers;
bool settings_show_video;

View file

@ -4178,6 +4178,14 @@ MSG_HASH(
MENU_ENUM_LABEL_INPUT_UNIFIED_MENU_CONTROLS,
"unified_menu_controls"
)
MSG_HASH(
MENU_ENUM_LABEL_INPUT_DISABLE_INFO_BUTTON,
"disable_info_button"
)
MSG_HASH(
MENU_ENUM_LABEL_INPUT_DISABLE_SEARCH_BUTTON,
"disable_search_button"
)
MSG_HASH(
MENU_ENUM_LABEL_QUIT_PRESS_TWICE,
"quit_press_twice"

View file

@ -2646,6 +2646,22 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS,
"Use the same controls for both the menu and the game. Applies to the keyboard."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_DISABLE_INFO_BUTTON,
"Disable Info Button"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_DISABLE_INFO_BUTTON,
"If enabled Info button presses will be ignored."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_DISABLE_SEARCH_BUTTON,
"Disable Search Button"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_DISABLE_SEARCH_BUTTON,
"If enabled Search button presses will be ignored."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL,
"Menu Swap OK and Cancel Buttons"

View file

@ -518,6 +518,8 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_history_list_enable, MENU_
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_history_size, MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_favorites_size, MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_input_unified_controls, MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_input_disable_info_button, MENU_ENUM_SUBLABEL_INPUT_DISABLE_INFO_BUTTON)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_input_disable_search_button, MENU_ENUM_SUBLABEL_INPUT_DISABLE_SEARCH_BUTTON)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_quit_press_twice, MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_onscreen_notifications_enable, MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_crop_overscan, MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN)
@ -3982,6 +3984,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_INPUT_UNIFIED_MENU_CONTROLS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_input_unified_controls);
break;
case MENU_ENUM_LABEL_INPUT_DISABLE_INFO_BUTTON:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_input_disable_info_button);
break;
case MENU_ENUM_LABEL_INPUT_DISABLE_SEARCH_BUTTON:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_input_disable_search_button);
break;
case MENU_ENUM_LABEL_QUIT_PRESS_TWICE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_quit_press_twice);
break;

View file

@ -6975,6 +6975,14 @@ unsigned menu_displaylist_build_list(
MENU_ENUM_LABEL_MENU_SCROLL_DELAY,
PARSE_ONLY_UINT, false) == 0)
count++;
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
MENU_ENUM_LABEL_INPUT_DISABLE_INFO_BUTTON,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
MENU_ENUM_LABEL_INPUT_DISABLE_SEARCH_BUTTON,
PARSE_ONLY_BOOL, false) == 0)
count++;
break;
case DISPLAYLIST_INPUT_SETTINGS_LIST:

View file

@ -6003,13 +6003,19 @@ unsigned menu_event(
else if (BIT256_GET_PTR(p_trigger_input, menu_cancel_btn))
ret = MENU_ACTION_CANCEL;
else if (BIT256_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_X))
ret = MENU_ACTION_SEARCH;
{
if (!settings->bools.menu_disable_search_button)
ret = MENU_ACTION_SEARCH;
}
else if (BIT256_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_Y))
ret = MENU_ACTION_SCAN;
else if (BIT256_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_START))
ret = MENU_ACTION_START;
else if (BIT256_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_SELECT))
ret = MENU_ACTION_INFO;
{
if (!settings->bools.menu_disable_info_button)
ret = MENU_ACTION_INFO;
}
else if (BIT256_GET_PTR(p_trigger_input, RARCH_MENU_TOGGLE))
ret = MENU_ACTION_TOGGLE;

View file

@ -13464,6 +13464,38 @@ static bool setting_append_list(
);
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_disable_info_button,
MENU_ENUM_LABEL_INPUT_DISABLE_INFO_BUTTON,
MENU_ENUM_LABEL_VALUE_INPUT_DISABLE_INFO_BUTTON,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_disable_search_button,
MENU_ENUM_LABEL_INPUT_DISABLE_SEARCH_BUTTON,
MENU_ENUM_LABEL_VALUE_INPUT_DISABLE_SEARCH_BUTTON,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
CONFIG_BOOL(
list, list_info,
&settings->bools.quit_press_twice,

View file

@ -1071,6 +1071,8 @@ enum msg_hash_enums
MENU_LABEL(INPUT_ALL_USERS_CONTROL_MENU),
MENU_LABEL(INPUT_POLL_TYPE_BEHAVIOR),
MENU_LABEL(INPUT_UNIFIED_MENU_CONTROLS),
MENU_LABEL(INPUT_DISABLE_INFO_BUTTON),
MENU_LABEL(INPUT_DISABLE_SEARCH_BUTTON),
MENU_LABEL(INPUT_RUMBLE_GAIN),
MENU_LABEL(QUIT_PRESS_TWICE),