summaryrefslogtreecommitdiff
path: root/src/list_menu.c
diff options
context:
space:
mode:
authorjiangzhengwenjz <jiangzhengwenjzw@qq.com>2019-07-08 06:18:58 +0800
committerjiangzhengwenjz <jiangzhengwenjzw@qq.com>2019-07-08 06:18:58 +0800
commit122f1395823cfa3dfd96842c61411ad29700f8de (patch)
tree4394601f49f220e3c32d9879a3c26284c9c92771 /src/list_menu.c
parent0e8a731cb815505601241a2c4ef9ca9df55640c6 (diff)
fixed multiple issue
Diffstat (limited to 'src/list_menu.c')
-rw-r--r--src/list_menu.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/list_menu.c b/src/list_menu.c
index a819ffc22..5f2bd02b3 100644
--- a/src/list_menu.c
+++ b/src/list_menu.c
@@ -132,11 +132,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;
@@ -195,11 +195,11 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
{
struct ListMenu *list = (struct ListMenu *)gTasks[listTaskId].data;
- if (gMain.newKeys & A_BUTTON)
+ if (JOY_NEW(A_BUTTON))
{
return list->template.items[list->scrollOffset + list->selectedRow].index;
}
- else if (gMain.newKeys & B_BUTTON)
+ else if (JOY_NEW(B_BUTTON))
{
return LIST_CANCEL;
}
@@ -249,8 +249,6 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
}
}
-#define TASK_NONE 0xFF
-
void DestroyListMenuTask(u8 listTaskId, u16 *scrollOffset, u16 *selectedRow)
{
struct ListMenu *list = (struct ListMenu *)gTasks[listTaskId].data;
@@ -434,8 +432,6 @@ static void ListMenuDrawCursor(struct ListMenu *list)
}
}
-#undef TASK_NONE
-
static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind)
{
struct CursorStruct cursor;