From bbfa903a99260ecfb0100da536b815842df2b1f4 Mon Sep 17 00:00:00 2001 From: Archez Date: Sun, 8 Sep 2024 18:54:11 -0400 Subject: [PATCH] fix more incorrect dpad handling for hud updates (#764) --- mm/src/code/z_parameter.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/mm/src/code/z_parameter.c b/mm/src/code/z_parameter.c index de76c56417..464d0e2edf 100644 --- a/mm/src/code/z_parameter.c +++ b/mm/src/code/z_parameter.c @@ -2376,6 +2376,14 @@ void Interface_UpdateButtonsPart2(PlayState* play) { } } + // #region 2S2H [Dpad] + for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) { + if (gSaveContext.shipSaveContext.dpad.status[j] == BTN_ENABLED) { + gSaveContext.shipSaveContext.dpad.status[j] = BTN_DISABLED; + } + } + // #endregion + Interface_SetHudVisibility(HUD_VISIBILITY_B); } else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_82_08)) { // Swordsman's log minigame @@ -2385,6 +2393,14 @@ void Interface_UpdateButtonsPart2(PlayState* play) { } } + // #region 2S2H [Dpad] + for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) { + if (gSaveContext.shipSaveContext.dpad.status[j] == BTN_ENABLED) { + gSaveContext.shipSaveContext.dpad.status[j] = BTN_DISABLED; + } + } + // #endregion + Interface_SetHudVisibility(HUD_VISIBILITY_A_B_HEARTS_MAGIC_MINIMAP); } else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_84_20)) { // Related to moon child @@ -2460,7 +2476,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) { gSaveContext.buttonStatus[i] = BTN_DISABLED; } // #region 2S2H [Dpad] - for (s16 j = EQUIP_SLOT_C_LEFT; j <= EQUIP_SLOT_C_RIGHT; j++) { + for (s16 j = EQUIP_SLOT_D_RIGHT; j <= EQUIP_SLOT_D_UP; j++) { if (gSaveContext.shipSaveContext.dpad.status[j] == BTN_ENABLED) { restoreHudVisibility = true; }