Map C-Up camera input to D-pad Up in dual analog mode
This commit is contained in:
parent
9391253c7e
commit
b11e652a20
|
@ -27,6 +27,12 @@ typedef enum {
|
||||||
EQUIP_SLOT_EX_OCARINA = -5
|
EQUIP_SLOT_EX_OCARINA = -5
|
||||||
} EquipSlotEx;
|
} EquipSlotEx;
|
||||||
|
|
||||||
|
static inline void dup_to_cup(u16* button) {
|
||||||
|
if (*button & BTN_DUP) {
|
||||||
|
*button |= BTN_CUP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GameState_GetInput(GameState* gameState) {
|
void GameState_GetInput(GameState* gameState) {
|
||||||
PadMgr_GetInput(gameState->input, true);
|
PadMgr_GetInput(gameState->input, true);
|
||||||
|
|
||||||
|
@ -34,6 +40,9 @@ void GameState_GetInput(GameState* gameState) {
|
||||||
gameState->input[0].cur.button &= ~BTN_CUP;
|
gameState->input[0].cur.button &= ~BTN_CUP;
|
||||||
gameState->input[0].press.button &= ~BTN_CUP;
|
gameState->input[0].press.button &= ~BTN_CUP;
|
||||||
gameState->input[0].rel.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;
|
prev_item_buttons = cur_item_buttons;
|
||||||
|
|
Loading…
Reference in New Issue