Skip to content

Commit 6c2cc45

Browse files
authored
Prevent proceeding to next bind when single binding (#15746)
1 parent 5e09d2f commit 6c2cc45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

menu/menu_driver.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5024,6 +5024,9 @@ static bool menu_input_key_bind_iterate(
50245024

50255025
if (complete)
50265026
{
5027+
/* Always stop binding when not binding all */
5028+
bool stop_binding = new_binds.order == 0 && new_binds.begin == new_binds.last;
5029+
50275030
/* Update bind */
50285031
*(new_binds.output) = new_binds.buffer;
50295032

@@ -5045,7 +5048,7 @@ static bool menu_input_key_bind_iterate(
50455048
new_binds.begin = MENU_SETTINGS_BIND_BEGIN + input_config_bind_order[new_binds.order];
50465049

50475050
if ( new_binds.order > ARRAY_SIZE(input_config_bind_order) - 1
5048-
|| new_binds.last != MENU_SETTINGS_BIND_LAST)
5051+
|| stop_binding)
50495052
{
50505053
input_st->keyboard_press_cb = NULL;
50515054
input_st->keyboard_press_data = NULL;

0 commit comments

Comments
 (0)