diff options
author | aaaaaa123456789 <aaaaaa123456789@acidch.at> | 2020-11-02 22:02:39 -0300 |
---|---|---|
committer | aaaaaa123456789 <aaaaaa123456789@acidch.at> | 2020-11-02 22:02:39 -0300 |
commit | bacc831aa91d059936bd7c852bf0a0fb44d8f27a (patch) | |
tree | 660080b3d0dd091d8827c679f489ffbfb337d3c3 /src/list_menu.c | |
parent | 6545745e5997f48e0c853b30b144a10244e7ba20 (diff) |
Re-apply joypad macros (minus merge conflicts)
Diffstat (limited to 'src/list_menu.c')
-rw-r--r-- | src/list_menu.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/list_menu.c b/src/list_menu.c index e3c4e11d2..3e5642e4c 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -335,11 +335,11 @@ s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str break; case 1: sMysteryGiftLinkMenu.currItemId = ListMenu_ProcessInput(sMysteryGiftLinkMenu.listTaskId); - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { sMysteryGiftLinkMenu.state = 2; } - if (gMain.newKeys & B_BUTTON) + if (JOY_NEW(B_BUTTON)) { sMysteryGiftLinkMenu.currItemId = LIST_CANCEL; sMysteryGiftLinkMenu.state = 2; @@ -410,20 +410,20 @@ s32 ListMenu_ProcessInput(u8 listTaskId) { struct ListMenu *list = (void*) gTasks[listTaskId].data; - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { return list->template.items[list->scrollOffset + list->selectedRow].id; } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { return LIST_CANCEL; } - else if (gMain.newAndRepeatedKeys & DPAD_UP) + else if (JOY_REPEAT(DPAD_UP)) { ListMenuChangeSelection(list, TRUE, 1, FALSE); return LIST_NOTHING_CHOSEN; } - else if (gMain.newAndRepeatedKeys & DPAD_DOWN) + else if (JOY_REPEAT(DPAD_DOWN)) { ListMenuChangeSelection(list, TRUE, 1, TRUE); return LIST_NOTHING_CHOSEN; @@ -439,10 +439,12 @@ s32 ListMenu_ProcessInput(u8 listTaskId) rightButton = FALSE; break; case LIST_MULTIPLE_SCROLL_DPAD: + // note: JOY_REPEAT won't match here leftButton = gMain.newAndRepeatedKeys & DPAD_LEFT; rightButton = gMain.newAndRepeatedKeys & DPAD_RIGHT; break; case LIST_MULTIPLE_SCROLL_L_R: + // same as above leftButton = gMain.newAndRepeatedKeys & L_BUTTON; rightButton = gMain.newAndRepeatedKeys & R_BUTTON; break; |