From 6c2cc456284fcfa6fa5f94664950926c020d2f7b Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:57:20 +0300 Subject: [PATCH] Prevent proceeding to next bind when single binding (#15746) --- menu/menu_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index f85f340bcb82..846371904d98 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -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;