diff --git a/config.def.h b/config.def.h index 97a95dacb1..61d29d3458 100644 --- a/config.def.h +++ b/config.def.h @@ -755,7 +755,11 @@ static const unsigned libretro_log_level = 1; /* Axis threshold (between 0.0 and 1.0) * How far an axis must be tilted to result in a button press. */ -static const float axis_threshold = 0.5; +static const float axis_threshold = 0.5f; + +static const float analog_deadzone = 0.0f; + +static const float analog_sensitivity = 1.0f; /* Describes speed of which turbo-enabled buttons toggle. */ static const unsigned turbo_period = 6; diff --git a/configuration.c b/configuration.c index 07af9cdc0a..a087f6a661 100644 --- a/configuration.c +++ b/configuration.c @@ -1634,6 +1634,8 @@ static struct config_float_setting *populate_settings_float(settings_t *settings SETTING_FLOAT("fastforward_ratio", &settings->floats.fastforward_ratio, true, fastforward_ratio, false); SETTING_FLOAT("slowmotion_ratio", &settings->floats.slowmotion_ratio, true, slowmotion_ratio, false); SETTING_FLOAT("input_axis_threshold", input_driver_get_float(INPUT_ACTION_AXIS_THRESHOLD), true, axis_threshold, false); + SETTING_FLOAT("input_analog_deadzone", &settings->floats.input_analog_deadzone, true, analog_deadzone, false); + SETTING_FLOAT("input_analog_sensitivity", &settings->floats.input_analog_sensitivity, true, analog_sensitivity, false); SETTING_FLOAT("video_msg_bgcolor_opacity", &settings->floats.video_msg_bgcolor_opacity, true, message_bgcolor_opacity, false); *size = count; diff --git a/configuration.h b/configuration.h index 4919a22c14..bd2c414b08 100644 --- a/configuration.h +++ b/configuration.h @@ -353,6 +353,8 @@ typedef struct settings float slowmotion_ratio; float fastforward_ratio; + float input_analog_deadzone; + float input_analog_sensitivity; } floats; struct diff --git a/input/input_driver.c b/input/input_driver.c index 9e8e1b913e..7d2b71f30a 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -1,6 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -876,6 +877,48 @@ static INLINE bool input_keys_pressed_iterate(unsigned i, return false; } +static int16_t input_joypad_axis(const input_device_driver_t *drv, unsigned port, uint32_t joyaxis) +{ + int16_t val = 0; + settings_t *settings = config_get_ptr(); + + if (!drv || !drv->axis) + return 0; + + val = drv->axis(port, joyaxis); + + if (settings->floats.input_analog_deadzone) + { + float normalized; + + /* if analog value is below the deadzone, ignore it */ + val = ((float)abs(val) / 0x7fff) < settings->floats.input_analog_deadzone ? 0 : val; + + if (val == 0) + return 0; + + normalized = (1.0f / 0x7fff) * val; + + /* now scale the "good" analog range appropriately, so we don't start out way above 0 */ + val = 0x7fff * ((normalized - settings->floats.input_analog_deadzone) / (1.0f - settings->floats.input_analog_deadzone)); + } + + if (settings->floats.input_analog_sensitivity != 1.0f) + { + float normalized = (1.0f / 0x7fff) * val; + int new_val = 0x7fff * normalized * settings->floats.input_analog_sensitivity; + + if (new_val > 0x7fff) + new_val = 0x7fff; + else if (new_val < -0x7fff) + new_val = -0x7fff; + + val = new_val; + } + + return val; +} + #ifdef HAVE_MENU /** @@ -979,7 +1022,7 @@ void input_menu_keys_pressed(void *data, input_bits_t *p_new_state) { if (joykey == NO_BTN || !sec->button(joypad_info.joy_idx, joykey)) { - int16_t axis = sec->axis(joypad_info.joy_idx, joyaxis); + int16_t axis = input_joypad_axis(sec, joypad_info.joy_idx, joyaxis); float scaled_axis = (float)abs(axis) / 0x8000; bit_pressed = scaled_axis > joypad_info.axis_threshold; } @@ -991,7 +1034,7 @@ void input_menu_keys_pressed(void *data, input_bits_t *p_new_state) { if (joykey == NO_BTN || !first->button(joypad_info.joy_idx, joykey)) { - int16_t axis = first->axis(joypad_info.joy_idx, joyaxis); + int16_t axis = input_joypad_axis(first, joypad_info.joy_idx, joyaxis); float scaled_axis = (float)abs(axis) / 0x8000; bit_pressed = scaled_axis > joypad_info.axis_threshold; } @@ -1682,34 +1725,36 @@ int16_t input_joypad_analog(const input_device_driver_t *drv, { int16_t res; - if ( idx == RETRO_DEVICE_INDEX_ANALOG_BUTTON ) + if (idx == RETRO_DEVICE_INDEX_ANALOG_BUTTON) { /* A RETRO_DEVICE_JOYPAD button? */ - if ( ident < RARCH_FIRST_CUSTOM_BIND ) + if (ident < RARCH_FIRST_CUSTOM_BIND) { uint32_t axis = 0; const struct retro_keybind *bind = NULL; bind = &binds[ ident ]; + if (!bind->valid) return 0; axis = bind->joyaxis; - if ( axis == AXIS_NONE ) - axis = joypad_info.auto_binds[ ident ].joyaxis; + + if (axis == AXIS_NONE) + axis = joypad_info.auto_binds[ident].joyaxis; /* Analog button. */ - res = abs( drv->axis( joypad_info.joy_idx, axis ) ); + res = abs(input_joypad_axis(drv, joypad_info.joy_idx, axis)); /* If the result is zero, it's got a digital button attached to it */ - if ( res == 0 ) + if (res == 0) { uint16_t key = bind->joykey; - if ( key == NO_BTN ) - key = joypad_info.auto_binds[ ident ].joykey; + if (key == NO_BTN) + key = joypad_info.auto_binds[ident].joykey; - if ( drv->button(joypad_info.joy_idx, key)) + if (drv->button(joypad_info.joy_idx, key)) res = 0x7fff; } } @@ -1747,8 +1792,8 @@ int16_t input_joypad_analog(const input_device_driver_t *drv, if (axis_plus == AXIS_NONE) axis_plus = joypad_info.auto_binds[ident_plus].joyaxis; - pressed_minus = abs(drv->axis(joypad_info.joy_idx, axis_minus)); - pressed_plus = abs(drv->axis(joypad_info.joy_idx, axis_plus)); + pressed_minus = abs(input_joypad_axis(drv, joypad_info.joy_idx, axis_minus)); + pressed_plus = abs(input_joypad_axis(drv, joypad_info.joy_idx, axis_plus)); res = pressed_plus - pressed_minus; if (res == 0) diff --git a/intl/msg_hash_ar.c b/intl/msg_hash_ar.c index d4ad60564b..6c7b3d87c4 100644 --- a/intl/msg_hash_ar.c +++ b/intl/msg_hash_ar.c @@ -1499,14 +1499,6 @@ int menu_hash_get_help_ar_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index 52cf18f812..c72799a4b5 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -759,8 +759,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Autoconfig Enable") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Analog Stick Deadzone") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Menu Swap OK & Cancel Buttons") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2465,10 +2463,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchronize audio. Recommended." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "How far an axis must be tilted to result in a button press." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Amount of seconds to wait until proceeding to the next bind." diff --git a/intl/msg_hash_chs.c b/intl/msg_hash_chs.c index 498c4e4e4c..ccdfae50ae 100644 --- a/intl/msg_hash_chs.c +++ b/intl/msg_hash_chs.c @@ -1399,13 +1399,6 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len) " \n" "减速游戏时,速度将被降低的倍数。"); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "摇杆灵敏度\n" - " \n" - "必须把摇杆推到多大幅度才算按下按键。\n" - "数值范围为0.0至1.0。"); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 1a68a5158d..709b8ec3c3 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -754,8 +754,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "启用自动配置") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "摇杆灵敏度") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "互换确定键和取消键") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2518,10 +2516,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "同步音频。推荐。" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "必须把摇杆推到多大幅度才算按下按键。" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Amount of seconds to wait until proceeding to the next bind." diff --git a/intl/msg_hash_cht.c b/intl/msg_hash_cht.c index b273803849..bfbf481b04 100644 --- a/intl/msg_hash_cht.c +++ b/intl/msg_hash_cht.c @@ -1443,14 +1443,6 @@ int menu_hash_get_help_cht_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index d263c9b501..b421cb1e8a 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -702,8 +702,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "啟用自動設定") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "輸入軸閾值") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "選單切換 確定/取消 按鈕") /*FIXME:"Menu Swap OK & Cancel Buttons"*/ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2294,10 +2292,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "同步聲音。推薦。" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "How far an axis must be tilted to result in a button press." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Amount of seconds to wait until proceeding to the next bind." diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 35d288c79d..838498c66b 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -1492,14 +1492,6 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "Ist die Zeitlupe eingeschaltet, wird das Spiel \n" "um diesen Faktor verlangsamt."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Definiert Achsen-Grenzwert.\n" - " \n" - "Wie weit eine Achse bewegt werden muss, um einen \n" - "Tastendruck auszulösen .\n" - "Mögliche Werte liegen im Bereich [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo-Frequenz.\n" diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 17db8d4b06..8515281b0c 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -735,8 +735,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Automatische Konfiguration aktivieren") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Schwellenwert der Analogsticks") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Vertausche OK- und Zurück-Tasten im Menü") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2402,10 +2400,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchronisiere Audio. Empfohlen." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Legt fest, wie weit ein Analog-Stick bewegt werden muss, bis er reagiert." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Zeitdauer in Sekunden, nach der die nächste Tastenbelegung abgefragt wird." diff --git a/intl/msg_hash_el.c b/intl/msg_hash_el.c index 8ca0867487..35a647c84e 100644 --- a/intl/msg_hash_el.c +++ b/intl/msg_hash_el.c @@ -1559,14 +1559,6 @@ int menu_hash_get_help_el_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_el.h b/intl/msg_hash_el.h index 8ee4f4409b..9b2099fa97 100644 --- a/intl/msg_hash_el.h +++ b/intl/msg_hash_el.h @@ -1002,10 +1002,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Ενεργοποίηση Αυτόματης Διαμόρφωσης" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Νεκρή Ζώνη Αναλογικού" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Εναλλαγή Κουμπιών Επιβεβαίωσης & Ακύρωσης Στο Μενού" @@ -4538,10 +4534,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Συγχρονισμός ήχου. Προτείνεται." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Πόσο μακριά ένας άξωνας πρέπει να γείρει ώστε να οδηγήσει σε πάτημα κουμπιού." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Χρόνος αναμονής σε δευτερόλεπτα μέχρι την συνέχιση στην επόμενη σύνδεση πλήκτρων." diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 26f889c6be..6d95430e96 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -622,8 +622,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Autoconfig Enable") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Analog Stick Deadzone") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Menu Swap OK & Cancel Buttons") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2203,10 +2201,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchronize audio. Recommended." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "How far an axis must be tilted to result in a button press." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Amount of seconds to wait until proceeding to the next bind." diff --git a/intl/msg_hash_es.c b/intl/msg_hash_es.c index 1b0842119f..3d94c02128 100644 --- a/intl/msg_hash_es.c +++ b/intl/msg_hash_es.c @@ -987,15 +987,6 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len) "Al reducir la velocidad, el contenido \n" "se ralentizará según este factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Define el margen de los ejes.\n" - " \n" - "Indica la distancia mínima que debe \n" - "recorrer un eje para que provoque \n" - "una pulsación del botón.\n" - "Los valores posibles son [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Período de turbo.\n" diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index dc0a7fd555..1e56d885e5 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -1045,10 +1045,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Activar Auto-configuración" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Zona muerta analógica" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Menú: cambiar OK y Cancelar" @@ -4619,10 +4615,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Sincronizar audio. Recomendado" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Cuanto debe mover la palanca para ser detectada. Evita movimientos indeseados en los mandos que no vuelven perfectamente al centro" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Cantidad de segundos a esperar hasta la siguiente asignación" diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 5d2b7a0ada..7e32f21d23 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -701,8 +701,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Activer l'autoconfiguration") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Seuil des axes analogiques") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Inverser les boutons OK et Annuler dans le menu") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2342,10 +2340,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchroniser le son avec le jeu. Recommandé." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Indique à quel point un axe doit être poussé avant d'obtenir une pression sur un bouton." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Nombre de secondes à attendre avant de passer à l'assignation suivante." diff --git a/intl/msg_hash_it.c b/intl/msg_hash_it.c index c81047efa0..1b39241eae 100644 --- a/intl/msg_hash_it.c +++ b/intl/msg_hash_it.c @@ -879,14 +879,6 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index c6a068d046..ad4252e318 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -707,8 +707,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Pistola D-pad Destro") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Abilita Autoconfigurazione") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Deadzone dello stick analogico") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Scambia i pulsanti OK & Annulla ") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2374,10 +2372,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Sincronizza l'audio. Consigliato." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Quanto deve essere inclinato un asse durante la pressione di un pulsante." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Quantità di secondi da attendere fino al prossimo bind." diff --git a/intl/msg_hash_ja.c b/intl/msg_hash_ja.c index e4d823c82e..0846ffac28 100644 --- a/intl/msg_hash_ja.c +++ b/intl/msg_hash_ja.c @@ -1475,14 +1475,6 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index daf231cebc..6367ad6abb 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -807,8 +807,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "ライトガンの十字キーの右") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "自動設定を有効") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "入力軸のしきい値") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "メニューのOKとキャンセルボタンをスワップ") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2544,10 +2542,6 @@ MSG_HASH( ) MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SYNC, "オーディオを同期する。推奨。") -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "入力を確定するために要するスティックの傾き量です。" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "次のバインドに移るまでの待機秒数です。" diff --git a/intl/msg_hash_ko.c b/intl/msg_hash_ko.c index 87c0c0adfb..14849fdf3e 100644 --- a/intl/msg_hash_ko.c +++ b/intl/msg_hash_ko.c @@ -1473,14 +1473,6 @@ int menu_hash_get_help_ko_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 57a12537ff..7449d7ab27 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -689,8 +689,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "무기 D-패드 오른쪽") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "자동설정 사용") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "아날로그 스틱 데드존") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "확인/취소 버튼 반전") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2300,10 +2298,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "오디오 동기화. 사용 권장." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "축의 기울기가 인식되는 범위를 설정." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "다음 입력 설정으로 넘어가기 전까지 대기하는 시간(초)." diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index a0f0b92e35..d26290e446 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -521,8 +521,12 @@ MSG_HASH(MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL, "menu_swap_ok_cancel") MSG_HASH(MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE, "input_autodetect_enable") -MSG_HASH(MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD, +MSG_HASH(MENU_ENUM_LABEL_INPUT_BUTTON_AXIS_THRESHOLD, "input_axis_threshold") +MSG_HASH(MENU_ENUM_LABEL_INPUT_ANALOG_DEADZONE, + "input_analog_deadzone") +MSG_HASH(MENU_ENUM_LABEL_INPUT_ANALOG_SENSITIVITY, + "input_analog_sensitivity") MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_MODE, "input_bind_mode") MSG_HASH(MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT, diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 04882dbf40..75a1c84608 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -626,8 +626,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Autoconfiguratie Activeren") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Analoge As Deadzone") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Menu Swap OK & Cancel Buttons") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2205,10 +2203,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchroniseer audio. Aangeraden." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "How far an axis must be tilted to result in a button press." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Amount of seconds to wait until proceeding to the next bind." diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index a6c7d7405e..df5f811da6 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -763,8 +763,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "D-pad prawo") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Włącz autoconfig") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Martwa strefa gałki analogowej") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Zamień przyciski menu ok i anuluj") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2500,10 +2498,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchronizuj dźwięk. Zalecane." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Jak daleko oś musi być przechylona, aby spowodować naciśnięcie przycisku." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Ilość sekund oczekiwania na przejście do następnej więzi." diff --git a/intl/msg_hash_pt_br.c b/intl/msg_hash_pt_br.c index dff66b5f81..a6a5ef24e5 100644 --- a/intl/msg_hash_pt_br.c +++ b/intl/msg_hash_pt_br.c @@ -1533,14 +1533,6 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len) "Quando está em Câmera Lenta, o conteúdo será \n" "diminuído pelo fator especificado/definido."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Define a zona morta do controle analógico. \n" - " \n" - "Até que ponto um eixo deve ser \n" - "movido para resultar em um botão pressionado. \n" - "Os valores aceitos são entre [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Período do turbo.\n" diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index e7ff535699..01c28608ff 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -1053,10 +1053,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Habilitar Auto Configuração" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Zona Morta do Controle Analógico" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Inverter Botões OK e Cancelar do Menu" @@ -4759,10 +4755,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Sincroniza o áudio. Recomendado." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Até que ponto um eixo deve ser movido para resultar em um botão pressionado." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Quantidade de segundos para aguardar até proceder para o próximo vínculo." diff --git a/intl/msg_hash_pt_pt.c b/intl/msg_hash_pt_pt.c index bfb24b202f..416f592a56 100644 --- a/intl/msg_hash_pt_pt.c +++ b/intl/msg_hash_pt_pt.c @@ -781,14 +781,6 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len) "Quando ativo, o conteúdo será executado numa velocidade\n" "reduzida por esse fator."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Define o limite de eixo.\n" - " \n" - "Representa o valor que deve ser atingido para\n" - "significar o pressionamento de um botão.\n" - " Valores possíveis são [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Período de turbo.\n" diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index fe3270ce50..5126656377 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -689,8 +689,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Botão direcional (direita) da pistola") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Ativar auto-configuração de teclas") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Zona morta do eixo analógico") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Menu trocar botões OK e Cancelar") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2289,10 +2287,6 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Sincronizar o som. Recomendado.") -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Até que ponto um eixo deve estar inclinado para causar o pressionamento de um botão." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Quantidade de segundos a aguardar até que seja feita uma nova associação." diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 589c08e3bb..2a6a556462 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -710,8 +710,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Автоматическая настройка включена") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Мертвая зона у стиков") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Поменять кнопки OK и Отмена") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2347,10 +2345,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Синхронизировать звук. Рекомендуется." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "Как далеко ось должна быть наклонена, чтобы вызвать нажатие кнопки." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Количество секунд ожидания до перехода к следующей привязке." diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 384ab23163..49a52aea3f 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -1572,9 +1572,9 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: + case MENU_ENUM_LABEL_INPUT_BUTTON_AXIS_THRESHOLD: snprintf(s, len, - "Defines axis threshold.\n" + "Defines the axis threshold.\n" " \n" "How far an axis must be tilted to result\n" "in a button press.\n" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 85f8d5e911..c92239d3c0 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1054,8 +1054,16 @@ MSG_HASH( "Autoconfig" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Analog Stick Deadzone" + MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, + "Input Button Axis Threshold" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_DEADZONE, + "Analog Deadzone" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_SENSITIVITY, + "Analog Sensitivity" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, @@ -4967,7 +4975,7 @@ MSG_HASH( "Synchronize audio. Recommended." ) MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, + MENU_ENUM_SUBLABEL_INPUT_BUTTON_AXIS_THRESHOLD, "How far an axis must be tilted to result in a button press." ) MSG_HASH( diff --git a/intl/msg_hash_vn.c b/intl/msg_hash_vn.c index 371a7d2e40..c32c016710 100644 --- a/intl/msg_hash_vn.c +++ b/intl/msg_hash_vn.c @@ -1476,14 +1476,6 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len) "When slowmotion, content will slow\n" "down by factor."); break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: snprintf(s, len, "Turbo period.\n" diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 1b43b88163..ef5597c2d8 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -701,8 +701,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, "Gun D-pad Right") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Kích hoạt Autoconfig") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, - "Analog Stick Deadzone") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Menu Swap OK & Cancel Buttons") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, @@ -2337,10 +2335,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchronize audio. Recommended." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, - "How far an axis must be tilted to result in a button press." - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Amount of seconds to wait until proceeding to the next bind." diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index de341c3a1e..e576a1748e 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -168,7 +168,7 @@ default_sublabel_macro(action_bind_sublabel_input_bind_hold, MENU_ 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) -default_sublabel_macro(action_bind_sublabel_axis_threshold, MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD) +default_sublabel_macro(action_bind_sublabel_axis_threshold, MENU_ENUM_SUBLABEL_INPUT_BUTTON_AXIS_THRESHOLD) default_sublabel_macro(action_bind_sublabel_input_turbo_period, MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD) default_sublabel_macro(action_bind_sublabel_input_duty_cycle, MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE) default_sublabel_macro(action_bind_sublabel_video_vertical_sync, MENU_ENUM_SUBLABEL_VIDEO_VSYNC) @@ -2028,7 +2028,7 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, 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: + case MENU_ENUM_LABEL_INPUT_BUTTON_AXIS_THRESHOLD: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_axis_threshold); break; case MENU_ENUM_LABEL_AUDIO_SYNC: diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index c2038ea153..b676b05a67 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -7130,7 +7130,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist ret = menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND, PARSE_ONLY_BOOL, false); ret = menu_displaylist_parse_settings_enum(menu, info, - MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD, PARSE_ONLY_FLOAT, false); + MENU_ENUM_LABEL_INPUT_BUTTON_AXIS_THRESHOLD, PARSE_ONLY_FLOAT, false); + ret = menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_INPUT_ANALOG_DEADZONE, PARSE_ONLY_FLOAT, false); + ret = menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_INPUT_ANALOG_SENSITIVITY, 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, diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 3b03386ba5..de1a0aaaae 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -7313,8 +7313,8 @@ static bool setting_append_list( CONFIG_FLOAT( list, list_info, input_driver_get_float(INPUT_ACTION_AXIS_THRESHOLD), - MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD, - MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, + MENU_ENUM_LABEL_INPUT_BUTTON_AXIS_THRESHOLD, + MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, axis_threshold, "%.3f", &group_info, @@ -7323,9 +7323,39 @@ static bool setting_append_list( general_write_handler, general_read_handler); (*list)[list_info->index - 1].action_ok = &setting_action_ok_uint; - menu_settings_list_current_add_range(list, list_info, 0, 1.00, 0.001, true, true); + menu_settings_list_current_add_range(list, list_info, 0, 1.0, 0.01, true, true); settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED); + CONFIG_FLOAT( + list, list_info, + &settings->floats.input_analog_deadzone, + MENU_ENUM_LABEL_INPUT_ANALOG_DEADZONE, + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_DEADZONE, + analog_deadzone, + "%.1f", + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_ok = &setting_action_ok_uint; + menu_settings_list_current_add_range(list, list_info, 0, 1.0, 0.1, true, true); + + CONFIG_FLOAT( + list, list_info, + &settings->floats.input_analog_sensitivity, + MENU_ENUM_LABEL_INPUT_ANALOG_SENSITIVITY, + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_SENSITIVITY, + analog_sensitivity, + "%.1f", + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + (*list)[list_info->index - 1].action_ok = &setting_action_ok_uint; + menu_settings_list_current_add_range(list, list_info, -5.0, 5.0, 0.1, true, true); + CONFIG_UINT( list, list_info, &settings->uints.input_bind_timeout, diff --git a/msg_hash.h b/msg_hash.h index 89c58939c1..789f216e03 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -750,7 +750,9 @@ enum msg_hash_enums MENU_LABEL(INPUT_AUTODETECT_ENABLE), MENU_LABEL(INPUT_DESCRIPTOR_LABEL_SHOW), MENU_LABEL(INPUT_DESCRIPTOR_HIDE_UNBOUND), - MENU_LABEL(INPUT_AXIS_THRESHOLD), + MENU_LABEL(INPUT_BUTTON_AXIS_THRESHOLD), + MENU_LABEL(INPUT_ANALOG_DEADZONE), + MENU_LABEL(INPUT_ANALOG_SENSITIVITY), MENU_LABEL(INPUT_BIND_TIMEOUT), MENU_LABEL(INPUT_BIND_HOLD), MENU_LABEL(INPUT_REMAP_BINDS_ENABLE), diff --git a/retroarch.cfg b/retroarch.cfg index a996f1c8bd..9d7c109bfe 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -375,6 +375,10 @@ # Defines axis threshold. Possible values are [0.0, 1.0] # input_axis_threshold = 0.5 +# input_analog_deadzone = 0.0 + +# input_analog_sensitivity = 1.0 + # Enable input auto-detection. Will attempt to autoconfigure # joypads, Plug-and-Play style. # input_autodetect_enable = true