diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2020-11-03 09:28:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 09:28:45 -0500 |
commit | 99dd461befcfe3bef3ce188fea2fb372c2f21b98 (patch) | |
tree | 2b0198d394186c371987f018677d12f929a66a44 /src/main.c | |
parent | 9e55ae22b19d58eca8fc0cdd2fcea9f2cca14319 (diff) | |
parent | ca950a8daf6dd95ab5dacc51f250fea7b605361c (diff) |
Merge pull request #1189 from aaaaaa123456789/reverts
Undo PokeCodec's PRs and port changes
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c index b3b76b1fb..ab0c23284 100644 --- a/src/main.c +++ b/src/main.c @@ -81,6 +81,8 @@ void InitIntrHandlers(void); static void WaitForVBlank(void); void EnableVCountIntrAtLine150(void); +#define B_START_SELECT (B_BUTTON | START_BUTTON | SELECT_BUTTON) + void AgbMain() { #if MODERN @@ -134,11 +136,9 @@ void AgbMain() { ReadKeys(); - if (!gSoftResetDisabled - && JOY_HELD_RAW(A_BUTTON) - && JOY_HELD_RAW(B_BUTTON) - && JOY_HELD_RAW(START_BUTTON) - && JOY_HELD_RAW(SELECT_BUTTON)) //The reset key combo A + B + START + SELECT + if (gSoftResetDisabled == FALSE + && (gMain.heldKeysRaw & A_BUTTON) + && (gMain.heldKeysRaw & B_START_SELECT) == B_START_SELECT) { rfu_REQ_stopMode(); rfu_waitREQComplete(); @@ -262,7 +262,9 @@ static void ReadKeys(void) if (keyInput != 0 && gMain.heldKeys == keyInput) { - if (--gMain.keyRepeatCounter == 0) + gMain.keyRepeatCounter--; + + if (gMain.keyRepeatCounter == 0) { gMain.newAndRepeatedKeys = keyInput; gMain.keyRepeatCounter = gKeyRepeatContinueDelay; @@ -341,7 +343,7 @@ static void VBlankIntr(void) { if (gWirelessCommType != 0) RfuVSync(); - else if (!gLinkVSyncDisabled) + else if (gLinkVSyncDisabled == FALSE) LinkVSync(); gMain.vblankCounter1++; |