Inconsistent d-pad button input order

This surprised me since there's code that forces e.g. a right-up if it's currently down and a left-down comes in, but after changing the demo to track the state for each button and alert if both sides are down, I'm seeing it too. In the simulator it's easy, you hold left and press and release right. On the device if you press hard enough you can trigger the buttons in the same way.

Yeah, I see the problem.. The root issue is the button handler code doesn't know what order the ups and downs came in from the hardware/simulator, just whether there was an event and what the current state is. If we change that interface to an event list we can fix this problem and also Tighter button debounce (or a way to set it). I don't expect that'll be too tricky. :crossed_fingers:

3 Likes