Make JOY Macros match
This commit is contained in:
parent
99448002e1
commit
da582d5258
2 changed files with 5 additions and 5 deletions
|
@ -99,7 +99,7 @@
|
||||||
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
|
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
|
||||||
|
|
||||||
// Macros for checking the joypad
|
// Macros for checking the joypad
|
||||||
#define TEST_BUTTON(field, button) ({(field) & (button);})
|
#define TEST_BUTTON(field, button) ((field) & (button))
|
||||||
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
|
#define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button)
|
||||||
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
|
#define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button)
|
||||||
#define JOY_HELD_RAW(button) TEST_BUTTON(gMain.heldKeysRaw, button)
|
#define JOY_HELD_RAW(button) TEST_BUTTON(gMain.heldKeysRaw, button)
|
||||||
|
|
|
@ -135,10 +135,10 @@ void AgbMain()
|
||||||
ReadKeys();
|
ReadKeys();
|
||||||
|
|
||||||
if (!gSoftResetDisabled
|
if (!gSoftResetDisabled
|
||||||
&& (gMain.heldKeysRaw & A_BUTTON)
|
&& JOY_HELD_RAW(A_BUTTON)
|
||||||
&& (gMain.heldKeysRaw & B_BUTTON)
|
&& JOY_HELD_RAW(B_BUTTON)
|
||||||
&& (gMain.heldKeysRaw & START_BUTTON)
|
&& JOY_HELD_RAW(START_BUTTON)
|
||||||
&& (gMain.heldKeysRaw & SELECT_BUTTON)) //The reset key combo A + B + START + SELECT
|
&& JOY_HELD_RAW(SELECT_BUTTON)) //The reset key combo A + B + START + SELECT
|
||||||
{
|
{
|
||||||
rfu_REQ_stopMode();
|
rfu_REQ_stopMode();
|
||||||
rfu_waitREQComplete();
|
rfu_waitREQComplete();
|
||||||
|
|
Loading…
Reference in a new issue