From 9c293f486beef2ee173664b8d8f0a1770b2d7472 Mon Sep 17 00:00:00 2001 From: enigma9o7 <30579733+enigma9o7@users.noreply.github.com> Date: Sun, 4 Oct 2020 08:40:11 -0700 Subject: [PATCH] Add cbutton/arrow support to options menu --- src/game/options_menu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/options_menu.c b/src/game/options_menu.c index 0bcb32b4..acb6b74e 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -572,13 +572,13 @@ void optmenu_check_buttons(void) { allowInput = 1; } - if (ABS(gPlayer1Controller->stickY) > 60) { + if ((ABS(gPlayer1Controller->stickY) > 60) || (gPlayer1Controller->buttonPressed & (D_CBUTTONS|U_CBUTTONS))) { if (allowInput) { #ifndef nosound play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs); #endif - if (gPlayer1Controller->stickY >= 60) { + if ((gPlayer1Controller->stickY >= 60) || (gPlayer1Controller->buttonPressed & U_CBUTTONS)) { currentMenu->select--; if (currentMenu->select < 0) currentMenu->select = currentMenu->numOpts-1; @@ -593,12 +593,12 @@ void optmenu_check_buttons(void) { else if (currentMenu->select > currentMenu->scroll + 3) currentMenu->scroll = currentMenu->select - 3; } - } else if (ABS(gPlayer1Controller->stickX) > 60) { + } else if ((ABS(gPlayer1Controller->stickX) > 60) || (gPlayer1Controller->buttonPressed & (L_CBUTTONS|R_CBUTTONS))) { if (allowInput) { #ifndef nosound play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs); #endif - if (gPlayer1Controller->stickX >= 60) + if ((gPlayer1Controller->stickX >= 60) || (gPlayer1Controller->buttonPressed & R_CBUTTONS)) optmenu_opt_change(¤tMenu->opts[currentMenu->select], 1); else optmenu_opt_change(¤tMenu->opts[currentMenu->select], -1);