Added missing uses of JOY_xx macros

This commit is contained in:
Eduardo Quezada 2022-09-22 21:43:33 -03:00
parent d79252aa7f
commit 7e112b0f0d
5 changed files with 11 additions and 11 deletions

View File

@ -1039,7 +1039,7 @@ static void MainCB2_Intro(void)
AnimateSprites();
BuildOamBuffer();
UpdatePaletteFade();
if (gMain.newKeys && !gPaletteFade.active)
if (gMain.newKeys != 0 && !gPaletteFade.active)
SetMainCallback2(MainCB2_EndIntro);
else if (gIntroFrameCounter != -1)
gIntroFrameCounter++;

View File

@ -440,13 +440,13 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
break;
case LIST_MULTIPLE_SCROLL_DPAD:
// note: JOY_REPEAT won't match here
leftButton = gMain.newAndRepeatedKeys & DPAD_LEFT;
rightButton = gMain.newAndRepeatedKeys & DPAD_RIGHT;
leftButton = JOY_REPEAT(DPAD_LEFT);
rightButton = JOY_REPEAT(DPAD_RIGHT);
break;
case LIST_MULTIPLE_SCROLL_L_R:
// same as above
leftButton = gMain.newAndRepeatedKeys & L_BUTTON;
rightButton = gMain.newAndRepeatedKeys & R_BUTTON;
leftButton = JOY_REPEAT(L_BUTTON);
rightButton = JOY_REPEAT(R_BUTTON);
break;
}

View File

@ -124,8 +124,8 @@ void AgbMain()
ReadKeys();
if (gSoftResetDisabled == FALSE
&& (gMain.heldKeysRaw & A_BUTTON)
&& (gMain.heldKeysRaw & B_START_SELECT) == B_START_SELECT)
&& JOY_HELD_RAW(A_BUTTON)
&& JOY_HELD_RAW(B_START_SELECT) == B_START_SELECT)
{
rfu_REQ_stopMode();
rfu_waitREQComplete();
@ -278,7 +278,7 @@ static void ReadKeys(void)
gMain.heldKeys |= A_BUTTON;
}
if (gMain.newKeys & gMain.watchedKeysMask)
if (JOY_NEW(gMain.watchedKeysMask))
gMain.watchedKeysPressed = TRUE;
}

View File

@ -634,7 +634,7 @@ static void MainCB2(void)
static void Task_TitleScreenPhase1(u8 taskId)
{
// Skip to next phase when A, B, Start, or Select is pressed
if ((gMain.newKeys & A_B_START_SELECT) || gTasks[taskId].data[1] != 0)
if (JOY_NEW(A_B_START_SELECT) || gTasks[taskId].data[1] != 0)
{
gTasks[taskId].tSkipToNext = TRUE;
gTasks[taskId].tCounter = 0;
@ -681,7 +681,7 @@ static void Task_TitleScreenPhase2(u8 taskId)
u32 yPos;
// Skip to next phase when A, B, Start, or Select is pressed
if ((gMain.newKeys & A_B_START_SELECT) || gTasks[taskId].tSkipToNext)
if (JOY_NEW(A_B_START_SELECT) || gTasks[taskId].tSkipToNext)
{
gTasks[taskId].tSkipToNext = TRUE;
gTasks[taskId].tCounter = 0;

View File

@ -1044,7 +1044,7 @@ static void Chat_HandleInput(void)
{
SetChatFunction(CHAT_FUNC_SWITCH);
}
else if (gMain.newAndRepeatedKeys & B_BUTTON)
else if (JOY_REPEAT(B_BUTTON))
{
if (sChat->bufferCursorPos)
{