From 58421a45fe1447e3d676b048420838bec9b013dd Mon Sep 17 00:00:00 2001 From: Steam Deck User Date: Thu, 2 Feb 2023 19:45:00 -0500 Subject: [PATCH] VITA/NX: Fix inaccessible 'Back' button in controls menu --- source/menu.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/menu.c b/source/menu.c index 6c2fb74..e34bd5e 100644 --- a/source/menu.c +++ b/source/menu.c @@ -3176,26 +3176,30 @@ void M_Keys_Key (int k) S_LocalSound ("sounds/menu/navigate.wav"); keys_cursor--; if (keys_cursor < 0) - keys_cursor = NUMCOMMANDS-1; + keys_cursor = NUMCOMMANDS; break; case K_DOWNARROW: case K_RIGHTARROW: S_LocalSound ("sounds/menu/navigate.wav"); keys_cursor++; - if (keys_cursor >= (int)NUMCOMMANDS) + if (keys_cursor >= (int)NUMCOMMANDS + 1) keys_cursor = 0; break; case K_ENTER: // go into bind mode case K_KP_ENTER: case K_ABUTTON: - M_FindKeysForCommand (bindnames[keys_cursor][0], keys); - S_LocalSound ("sounds/menu/enter.wav"); - if (keys[2] != -1) - M_UnbindCommand (bindnames[keys_cursor][0]); - bind_grab = true; - IN_Activate(); // activate to allow mouse key binding + if (keys_cursor == NUMCOMMANDS) + M_Menu_Options_f(); + else { + M_FindKeysForCommand (bindnames[keys_cursor][0], keys); + S_LocalSound ("sounds/menu/enter.wav"); + if (keys[2] != -1) + M_UnbindCommand (bindnames[keys_cursor][0]); + bind_grab = true; + IN_Activate(); // activate to allow mouse key binding + } break; case K_BACKSPACE: // delete bindings