Re-apply joypad macros (minus merge conflicts)

This commit is contained in:
aaaaaa123456789
2020-11-02 22:02:39 -03:00
parent 6545745e59
commit bacc831aa9
71 changed files with 651 additions and 648 deletions

View File

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