pokeemerald icon indicating copy to clipboard operation
pokeemerald copied to clipboard

BUGFIX: Fix L=A by comparing the rawkeys to the previous keyinput

Open AZero13 opened this issue 1 year ago • 11 comments

Also remap newAndRepeatedKeys

AZero13 avatar Oct 03 '24 19:10 AZero13

Is there somewhere in-game where I can verify that this change works?

mrgriffin avatar Oct 08 '24 12:10 mrgriffin

Is there somewhere in-game where I can verify that this change works?

Absolutely. Because heldKeys compares with keyInput, holding the L button alongside holding another button means neither button will never be considered to be held if L=A is set. Holding L button alongside another button means both buttons are repeating.

Honestly, we can get away with not adding A to newandrepeating because it is never checked for newandrepeating, but what was mentioned about the check above still applies.

AZero13 avatar Oct 08 '24 12:10 AZero13

Sorry, I think you misunderstood my question.

Where in-game should I test the L=A repeating behavior so that I can check that this PR works?

mrgriffin avatar Oct 08 '24 12:10 mrgriffin

Sorry, I think you misunderstood my question.

Where in-game should I test the L=A repeating behavior so that I can check that this PR works?

Any menu where holding a button has a behavior. For instance, if you hold the L button while also holding the down button in the Pokedex, it won't scroll downwards, and instead just go down by 1 and remain, which is changed by this PR.

AZero13 avatar Oct 08 '24 12:10 AZero13

In all honesty, we can completely get away with not remapping newAndRepeatedKeys, as the only values checked in this value are DPAD values, but I just have it here for completion's sake. I can remove it if you want.

AZero13 avatar Oct 10 '24 19:10 AZero13

What do you think @mrgriffin? Should I even bother remapping newAndRepeatedKeys?

AZero13 avatar Oct 11 '24 20:10 AZero13

I haven't had the time to familiarize myself with the code and test your change in-game yet. But once I've done that I can give you an opinion about newAndRepeatedKeys :)

mrgriffin avatar Oct 12 '24 07:10 mrgriffin

Please let me know when you get the chance :)

AZero13 avatar Oct 16 '24 16:10 AZero13

newAndRepeatedKeys is only checked for DPAD values, so it doesn't affect pret at all.

Going to just take it out.

AZero13 avatar Oct 21 '24 04:10 AZero13

"newAndRepeatedKeys is never remapped either." Should probably be moved to where the remapping happens, honestly.

AZero13 avatar Oct 28 '24 20:10 AZero13

Any update on this by the way?

AZero13 avatar Mar 01 '25 22:03 AZero13