From 36c98b6cd1b590d05bf09d5eac2875d109d07975 Mon Sep 17 00:00:00 2001 From: Denis Kopyrin Date: Sun, 10 Dec 2023 15:28:08 +0800 Subject: [PATCH] Disable unrelated buttons controlling S&Q menu and pausing (#728) --- src/game/ingame_menu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index 1bd615ce..2f59482a 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -581,11 +581,11 @@ void handle_menu_scrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8 u8 index = 0; if (scrollDirection == MENU_SCROLL_VERTICAL) { - if ((gPlayer1Controller->rawStickY > 60) || (gPlayer1Controller->buttonDown & (U_CBUTTONS | U_JPAD))) index++; - if ((gPlayer1Controller->rawStickY < -60) || (gPlayer1Controller->buttonDown & (D_CBUTTONS | D_JPAD))) index += 2; + if (gPlayer1Controller->rawStickY > 60) index++; + if (gPlayer1Controller->rawStickY < -60) index += 2; } else if (scrollDirection == MENU_SCROLL_HORIZONTAL) { - if ((gPlayer1Controller->rawStickX > 60) || (gPlayer1Controller->buttonDown & (R_CBUTTONS | R_JPAD))) index += 2; - if ((gPlayer1Controller->rawStickX < -60) || (gPlayer1Controller->buttonDown & (L_CBUTTONS | L_JPAD))) index++; + if (gPlayer1Controller->rawStickX > 60) index += 2; + if (gPlayer1Controller->rawStickX < -60) index++; } if (((index ^ gMenuHoldKeyIndex) & index) == 2) { @@ -1932,7 +1932,7 @@ s32 render_pause_courses_and_castle(void) { render_pause_castle_menu_box(160, 143); render_pause_castle_main_strings(104, 60); - if (gPlayer1Controller->buttonPressed & (A_BUTTON | START_BUTTON | Z_TRIG)) { + if (gPlayer1Controller->buttonPressed & (A_BUTTON | START_BUTTON)) { level_set_transition(0, NULL); play_sound(SOUND_MENU_PAUSE_CLOSE, gGlobalSoundSource); gMenuMode = MENU_MODE_NONE;