mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-10 04:51:32 +00:00
Add option and menu setting for viewing inputs on overlay.
This commit is contained in:
parent
4ed715d0f3
commit
f0606d60d2
@ -1226,6 +1226,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_BOOL("input_overlay_enable", &settings->bools.input_overlay_enable, true, config_overlay_enable_default(), false);
|
||||
SETTING_BOOL("input_overlay_enable_autopreferred", &settings->bools.input_overlay_enable_autopreferred, true, true, false);
|
||||
SETTING_BOOL("input_overlay_show_physical_inputs", &settings->bools.input_overlay_show_physical_inputs, true, false, false);
|
||||
SETTING_BOOL("input_overlay_hide_in_menu", &settings->bools.input_overlay_hide_in_menu, true, overlay_hide_in_menu, false);
|
||||
#endif
|
||||
#ifdef HAVE_COMMAND
|
||||
|
@ -88,6 +88,7 @@ typedef struct settings
|
||||
bool input_overlay_enable;
|
||||
bool input_overlay_enable_autopreferred;
|
||||
bool input_overlay_hide_in_menu;
|
||||
bool input_overlay_show_physical_inputs;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
bool input_all_users_control_menu;
|
||||
|
@ -705,8 +705,9 @@ void input_poll_overlay(input_overlay_t *ol, float opacity, unsigned analog_dpad
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
button_pressed = input_overlay_add_inputs(ol, 0, analog_dpad_mode);
|
||||
if(settings->bools.input_overlay_show_physical_inputs){
|
||||
button_pressed = input_overlay_add_inputs(ol, 0, analog_dpad_mode);
|
||||
}
|
||||
if (button_pressed || polled)
|
||||
input_overlay_post_poll(ol, opacity);
|
||||
else
|
||||
@ -803,7 +804,7 @@ static bool input_overlay_add_inputs(input_overlay_t *ol,
|
||||
|
||||
desc->delta_x = dx;
|
||||
desc->delta_y = dy;
|
||||
/*Maybe use some option here instead orf 0, only display
|
||||
/*Maybe use some option here instead of 0, only display
|
||||
changes greater than some magnitude.
|
||||
*/
|
||||
if((dx*dx) > 0 || (dy*dy) > 0)
|
||||
@ -815,7 +816,6 @@ static bool input_overlay_add_inputs(input_overlay_t *ol,
|
||||
desc->updated = true;
|
||||
button_pressed = true;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -479,6 +479,8 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE,
|
||||
"input_overlay_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU,
|
||||
"overlay_hide_in_menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
"overlay_show_physical_inputs")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE,
|
||||
"input_player%u_analog_dpad_mode")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR,
|
||||
|
@ -572,6 +572,11 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) {
|
||||
"Hide the current overlay from appearing \n"
|
||||
"inside the menu.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS:
|
||||
snprintf(s, len,
|
||||
"Show controller button presses on \n"
|
||||
"the onscreen overlay.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OVERLAY_PRESET:
|
||||
snprintf(s, len,
|
||||
"Path to input overlay.");
|
||||
|
@ -827,6 +827,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE,
|
||||
"Display Overlay")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU,
|
||||
"Hide Overlay In Menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
"Show Inputs On Overlay")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR,
|
||||
"Poll Type Behavior")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY,
|
||||
|
@ -5007,6 +5007,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_OVERLAY_PRESET,
|
||||
PARSE_ONLY_PATH, false);
|
||||
|
@ -4891,6 +4891,22 @@ static bool setting_append_list(
|
||||
);
|
||||
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.input_overlay_show_physical_inputs,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
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_NONE
|
||||
);
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->paths.path_overlay,
|
||||
|
@ -598,6 +598,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(INPUT_OSK_OVERLAY_ENABLE),
|
||||
MENU_LABEL(INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO),
|
||||
MENU_LABEL(INPUT_OVERLAY_HIDE_IN_MENU),
|
||||
MENU_LABEL(INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS),
|
||||
MENU_LABEL(INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE),
|
||||
MENU_LABEL(INPUT_SMALL_KEYBOARD_ENABLE),
|
||||
MENU_LABEL(INPUT_TOUCH_ENABLE),
|
||||
|
Loading…
Reference in New Issue
Block a user