Skip to content

Commit 1cd9041

Browse files
committed
BUGFIX: Fix L=A by comparing the rawkeys to the previous keyinput instead of the converted keys
Also remap newAndRepeatedKeys
1 parent 9a24c03 commit 1cd9041

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,13 @@ static void ReadKeys(void)
258258
// because it compares the raw key input with the remapped held keys.
259259
// Note that newAndRepeatedKeys is never remapped either.
260260

261+
#ifdef BUGFIX
262+
if (keyInput != 0 && gMain.heldKeysRaw == keyInput)
263+
#else
261264
if (keyInput != 0 && gMain.heldKeys == keyInput)
265+
#endif
262266
{
263-
gMain.keyRepeatCounter--;
264-
265-
if (gMain.keyRepeatCounter == 0)
267+
if (--gMain.keyRepeatCounter == 0)
266268
{
267269
gMain.newAndRepeatedKeys = keyInput;
268270
gMain.keyRepeatCounter = gKeyRepeatContinueDelay;
@@ -285,6 +287,10 @@ static void ReadKeys(void)
285287

286288
if (JOY_HELD(L_BUTTON))
287289
gMain.heldKeys |= A_BUTTON;
290+
#ifdef BUGFIX
291+
if (JOY_REPEAT(L_BUTTON))
292+
gMain.newAndRepeatedKeys |= A_BUTTON;
293+
#endif
288294
}
289295

290296
if (JOY_NEW(gMain.watchedKeysMask))

0 commit comments

Comments
 (0)