Skip to content

Commit

Permalink
Prevent proceeding to next bind when single binding (#15746)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos authored Sep 28, 2023
1 parent 5e09d2f commit 6c2cc45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion menu/menu_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 6c2cc45

Please sign in to comment.