Prevent proceeding to next bind when single binding (#15746)

This commit is contained in:
sonninnos 2023-09-28 16:57:20 +03:00 committed by GitHub
parent 5e09d2f3a5
commit 6c2cc45628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5024,6 +5024,9 @@ static bool menu_input_key_bind_iterate(
if (complete)
{
/* Always stop binding when not binding all */
bool stop_binding = new_binds.order == 0 && new_binds.begin == new_binds.last;
/* Update bind */
*(new_binds.output) = new_binds.buffer;
@ -5045,7 +5048,7 @@ static bool menu_input_key_bind_iterate(
new_binds.begin = MENU_SETTINGS_BIND_BEGIN + input_config_bind_order[new_binds.order];
if ( new_binds.order > ARRAY_SIZE(input_config_bind_order) - 1
|| new_binds.last != MENU_SETTINGS_BIND_LAST)
|| stop_binding)
{
input_st->keyboard_press_cb = NULL;
input_st->keyboard_press_data = NULL;