new setting "input_bind_hold"

This commit is contained in:
David Walters 2018-04-04 09:33:59 +01:00 committed by radius
parent 04311695aa
commit 8a2b23de34
26 changed files with 118 additions and 2 deletions

View File

@ -662,6 +662,8 @@ static const unsigned input_poll_type_behavior = 2;
static const unsigned input_bind_timeout = 5;
static const unsigned input_bind_hold = 2;
static const unsigned menu_thumbnails_default = 3;
static const unsigned menu_left_thumbnails_default = 0;

View File

@ -1494,6 +1494,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
struct config_uint_setting *tmp = (struct config_uint_setting*)malloc((*size + 1) * sizeof(struct config_uint_setting));
SETTING_UINT("input_bind_timeout", &settings->uints.input_bind_timeout, true, input_bind_timeout, false);
SETTING_UINT("input_bind_hold", &settings->uints.input_bind_hold, true, input_bind_hold, false);
SETTING_UINT("input_turbo_period", &settings->uints.input_turbo_period, true, turbo_period, false);
SETTING_UINT("input_duty_cycle", &settings->uints.input_turbo_duty_cycle, true, turbo_duty_cycle, false);
SETTING_UINT("input_max_users", input_driver_get_uint(INPUT_ACTION_MAX_USERS), true, input_max_users, false);

View File

@ -333,6 +333,7 @@ typedef struct settings
unsigned input_turbo_duty_cycle;
unsigned input_bind_timeout;
unsigned input_bind_hold;
unsigned input_menu_toggle_gamepad_combo;
unsigned input_keyboard_gamepad_mapping_type;

View File

@ -614,6 +614,11 @@ int menu_hash_get_help_ar_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay scale.");

View File

@ -765,6 +765,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL,
"Bind Default All")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
"Bind Timeout")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
"Bind Hold")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"Hide Unbound Core Input Descriptors")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,
@ -2459,6 +2461,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period when turbo-enabled buttons are toggled. Numbers are described in frames."

View File

@ -569,6 +569,11 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay scale.");

View File

@ -2299,6 +2299,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period of which turbo-enabled buttons toggle. Numbers are described in frames."

View File

@ -566,6 +566,11 @@ int menu_hash_get_help_cht_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay 比例.");

View File

@ -2291,6 +2291,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period of which turbo-enabled buttons toggle. Numbers are described in frames."

View File

@ -593,6 +593,11 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
"Anzahl der Sekunden, die gewartet werden soll, \n"
"bis zur nächsten Belegung gewechselt wird.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay-Skalierung.");
@ -864,7 +869,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
const char *lbl = settings ? settings->arrays.audio_resampler : NULL;
if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER_SINC)))
strlcpy(s,
strlcpy(s,
"Windowed-SINC-Implementierung.", len);
else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER_CC)))
strlcpy(s,

View File

@ -628,6 +628,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL,
"Bind Default All")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
"Bind Timeout")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
"Bind Hold")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"Hide Unbound Core Input Descriptors")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,
@ -2190,6 +2192,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period of which turbo-enabled buttons toggle. Numbers are described in frames."

View File

@ -713,6 +713,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL,
"Bind Default All")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
"Bind Timeout")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
"Bind Hold")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"Nascondi i descrittori di input di core non legati")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,

View File

@ -586,6 +586,11 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay scale.");

View File

@ -2443,6 +2443,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period of which turbo-enabled buttons toggle. Numbers are described in frames."

View File

@ -588,6 +588,11 @@ int menu_hash_get_help_ko_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay scale.");
@ -858,7 +863,7 @@ int menu_hash_get_help_ko_enum(enum msg_hash_enums msg, char *s, size_t len)
strlcpy(s,
"Windowed SINC implementation.", len);
else if (string_is_equal(lbl, msg_hash_to_str(MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER_CC)))
strlcpy(s,
strlcpy(s,
"Convoluted Cosine implementation.", len);
else if (string_is_empty(s))
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len);

View File

@ -493,6 +493,8 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_MODE,
"input_bind_mode")
MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT,
"input_bind_timeout")
MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_HOLD,
"input_bind_hold")
MSG_HASH(MENU_ENUM_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"input_descriptor_hide_unbound")
MSG_HASH(MENU_ENUM_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW,

View File

@ -628,6 +628,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL,
"Bind Default All")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
"Bind Timeout")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
"Bind Hold")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"Verbergen Niet-gemapte Core Input Descripties")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,
@ -2188,6 +2190,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period of which turbo-enabled buttons toggle. Numbers are described in frames."

View File

@ -618,6 +618,11 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
"Quantos segundos aguardar até prosseguir \n"
"para o próximo vínculo.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Escala da Transparência.");

View File

@ -610,6 +610,11 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay scale.");

View File

@ -777,6 +777,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL,
"Bind Default All")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
"Bind Timeout")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
"Bind Hold")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"Hide Unbound Core Input Descriptors")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,
@ -2515,6 +2517,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period when turbo-enabled buttons are toggled. Numbers are described in frames."

View File

@ -586,6 +586,11 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
"Amount of seconds to wait until proceeding \n"
"to the next bind.");
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
snprintf(s, len,
"Input bind hold time (in seconds). \n"
"Amount of seconds to hold an input to bind it.");
break;
case MENU_ENUM_LABEL_OVERLAY_SCALE:
snprintf(s, len,
"Overlay scale.");

View File

@ -707,6 +707,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL,
"Bind Default All")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
"Bind Timeout")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
"Bind Hold")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
"Hide Unbound Core Input Descriptors")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,
@ -2327,6 +2329,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT,
"Amount of seconds to wait until proceeding to the next bind."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD,
"Amount of seconds to hold an input to bind it."
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD,
"Describes the period when turbo-enabled buttons are toggled. Numbers are described in frames."

View File

@ -145,6 +145,7 @@ default_sublabel_macro(action_bind_sublabel_input_max_users, MENU_
default_sublabel_macro(action_bind_sublabel_input_poll_type_behavior, MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR)
default_sublabel_macro(action_bind_sublabel_input_all_users_control_menu, MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU)
default_sublabel_macro(action_bind_sublabel_input_bind_timeout, MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT)
default_sublabel_macro(action_bind_sublabel_input_bind_hold, MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD)
default_sublabel_macro(action_bind_sublabel_audio_volume, MENU_ENUM_SUBLABEL_AUDIO_VOLUME)
default_sublabel_macro(action_bind_sublabel_audio_mixer_volume, MENU_ENUM_SUBLABEL_AUDIO_MIXER_VOLUME)
default_sublabel_macro(action_bind_sublabel_audio_sync, MENU_ENUM_SUBLABEL_AUDIO_SYNC)
@ -1485,6 +1486,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_bind_timeout);
break;
case MENU_ENUM_LABEL_INPUT_BIND_HOLD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_bind_hold);
break;
case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_axis_threshold);
break;

View File

@ -6298,6 +6298,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD, PARSE_ONLY_FLOAT, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT, PARSE_ONLY_UINT, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_INPUT_BIND_HOLD, PARSE_ONLY_UINT, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_INPUT_TURBO_PERIOD, PARSE_ONLY_UINT, false);
ret = menu_displaylist_parse_settings_enum(menu, info,

View File

@ -4546,6 +4546,20 @@ static bool setting_append_list(
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_UINT(
list, list_info,
&settings->uints.input_bind_hold,
MENU_ENUM_LABEL_INPUT_BIND_HOLD,
MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD,
input_bind_hold,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_UINT(
list, list_info,
&settings->uints.input_turbo_period,

View File

@ -664,6 +664,7 @@ enum msg_hash_enums
MENU_LABEL(INPUT_DESCRIPTOR_HIDE_UNBOUND),
MENU_LABEL(INPUT_AXIS_THRESHOLD),
MENU_LABEL(INPUT_BIND_TIMEOUT),
MENU_LABEL(INPUT_BIND_HOLD),
MENU_LABEL(INPUT_REMAP_BINDS_ENABLE),
MENU_LABEL(MENU_INPUT_SWAP_OK_CANCEL),
MENU_LABEL(INPUT_OVERLAY_ENABLE),