mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-11 12:37:14 -05:00
Merge a148e7e4cf into 83df84e406
This commit is contained in:
15
src/main.c
15
src/main.c
@@ -256,13 +256,16 @@ static void ReadKeys(void)
|
||||
|
||||
// BUG: Key repeat won't work when pressing L using L=A button mode
|
||||
// because it compares the raw key input with the remapped held keys.
|
||||
// Note that newAndRepeatedKeys is never remapped either.
|
||||
|
||||
// Checking the raw held keys instead of the remapped ones matches
|
||||
// the fix implemented in future generations.
|
||||
#ifdef BUGFIX
|
||||
if (keyInput != 0 && gMain.heldKeysRaw == keyInput)
|
||||
#else
|
||||
if (keyInput != 0 && gMain.heldKeys == keyInput)
|
||||
#endif
|
||||
{
|
||||
gMain.keyRepeatCounter--;
|
||||
|
||||
if (gMain.keyRepeatCounter == 0)
|
||||
if (--gMain.keyRepeatCounter == 0)
|
||||
{
|
||||
gMain.newAndRepeatedKeys = keyInput;
|
||||
gMain.keyRepeatCounter = gKeyRepeatContinueDelay;
|
||||
@@ -285,6 +288,10 @@ static void ReadKeys(void)
|
||||
|
||||
if (JOY_HELD(L_BUTTON))
|
||||
gMain.heldKeys |= A_BUTTON;
|
||||
|
||||
// newAndRepeatedKeys is not remapped at all.
|
||||
// Does not matter in vanilla since newAndRepeatedKeys
|
||||
// is only checked with D-Pad values anyway.
|
||||
}
|
||||
|
||||
if (JOY_NEW(gMain.watchedKeysMask))
|
||||
|
||||
Reference in New Issue
Block a user