Show also lightgun bind labels instead of only 'N/A' (#15535)

This commit is contained in:
sonninnos 2023-07-31 06:12:21 +03:00 committed by GitHub
parent 0b9e5975f5
commit dbdcf1482e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -201,9 +201,8 @@ static const struct retro_keybind retro_keybinds_1[] = {
{
NULL, NULL,
AXIS_NONE, AXIS_NONE, AXIS_NONE,
RARCH_LIGHTGUN_RELOAD,
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN,
NO_BTN, NO_BTN, 0,
RARCH_LIGHTGUN_RELOAD, RETRO_DEVICE_ID_MOUSE_RIGHT, NO_BTN, 0,
true
},
{
@ -838,7 +837,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
NULL, NULL,
AXIS_NONE, AXIS_NONE, AXIS_NONE,
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN,
RARCH_LIGHTGUN_RELOAD, NO_BTN, NO_BTN, 0,
RARCH_LIGHTGUN_RELOAD, RETRO_DEVICE_ID_MOUSE_RIGHT, NO_BTN, 0,
true
},
{
@ -1473,7 +1472,7 @@ static const struct retro_keybind retro_keybinds_1[] = {
NULL, NULL,
AXIS_NONE, AXIS_NONE, AXIS_NONE,
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN,
RARCH_LIGHTGUN_RELOAD, NO_BTN, NO_BTN, 0,
RARCH_LIGHTGUN_RELOAD, RETRO_DEVICE_ID_MOUSE_RIGHT, NO_BTN, 0,
true
},
{
@ -2122,7 +2121,7 @@ static const struct retro_keybind retro_keybinds_rest[] = {
NULL, NULL,
AXIS_NONE, AXIS_NONE, AXIS_NONE,
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN,
RARCH_LIGHTGUN_RELOAD, NO_BTN, NO_BTN, 0,
RARCH_LIGHTGUN_RELOAD, RETRO_DEVICE_ID_MOUSE_RIGHT, NO_BTN, 0,
true
},
{

View File

@ -757,9 +757,9 @@ static int setting_bind_action_start(rarch_setting_t *setting)
def_binds = (struct retro_keybind*)retro_keybinds_rest;
bind_type = setting->bind_type;
keybind->key = def_binds[bind_type - MENU_SETTINGS_BIND_BEGIN].key;
keybind->mbutton = NO_BTN;
keybind->key = def_binds[bind_type - MENU_SETTINGS_BIND_BEGIN].key;
keybind->mbutton = def_binds[bind_type - MENU_SETTINGS_BIND_BEGIN].mbutton;
/* Store new mapping bit */
input_keyboard_mapping_bits(1, keybind->key);
@ -9143,7 +9143,10 @@ static bool setting_append_list_input_player_options(
sizeof(label) - _len);
else
{
strlcpy(label + _len, value_na, sizeof(label) - _len);
snprintf(label, sizeof(label), "%s (%s)",
input_config_bind_map_get_desc(i),
value_na);
if (settings->bools.input_descriptor_hide_unbound)
continue;
}