Map C-Up camera input to D-pad Up in dual analog mode

This commit is contained in:
Mr-Wiseguy 2023-12-03 23:35:17 -05:00
parent 9391253c7e
commit b11e652a20

View File

@ -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;