From b11e652a2095d0195882372652f22f907c516e47 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Sun, 3 Dec 2023 23:35:17 -0500 Subject: [PATCH] Map C-Up camera input to D-pad Up in dual analog mode --- patches/input.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/input.c b/patches/input.c index 79472a9..5356326 100644 --- a/patches/input.c +++ b/patches/input.c @@ -27,6 +27,12 @@ typedef enum { EQUIP_SLOT_EX_OCARINA = -5 } EquipSlotEx; +static inline void dup_to_cup(u16* button) { + if (*button & BTN_DUP) { + *button |= BTN_CUP; + } +} + void GameState_GetInput(GameState* gameState) { PadMgr_GetInput(gameState->input, true); @@ -34,6 +40,9 @@ void GameState_GetInput(GameState* gameState) { gameState->input[0].cur.button &= ~BTN_CUP; gameState->input[0].press.button &= ~BTN_CUP; gameState->input[0].rel.button &= ~BTN_CUP; + dup_to_cup(&gameState->input[0].cur.button); + dup_to_cup(&gameState->input[0].press.button); + dup_to_cup(&gameState->input[0].rel.button); } prev_item_buttons = cur_item_buttons;