Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: Fix L=A by comparing the rawkeys to the previous keyinput ins…
Browse files Browse the repository at this point in the history
…tead of the converted keys
AZero13 committed Oct 3, 2024
1 parent 9a24c03 commit 6a8d384
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -258,11 +258,13 @@ static void ReadKeys(void)
// because it compares the raw key input with the remapped held keys.
// Note that newAndRepeatedKeys is never remapped either.

#if 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 +287,10 @@ static void ReadKeys(void)

if (JOY_HELD(L_BUTTON))
gMain.heldKeys |= A_BUTTON;
#if BUGFIX
if (JOY_REPEAT(L_BUTTON))
gMain.newAndRepeatedKeys |= A_BUTTON;
#endif
}

if (JOY_NEW(gMain.watchedKeysMask))

0 comments on commit 6a8d384

Please sign in to comment.