GP2040-CE icon indicating copy to clipboard operation
GP2040-CE copied to clipboard

Fixes dpad to analog being interrupted by mouse movement input to resolve #1515

Open Fran89 opened this issue 2 months ago • 0 comments

This is my attempt to fix the problem of the dpad interruption whenever the mouse report movement input. The issue lies in the preprocess_report function. Inside it uses a function to zero out the dpad input, no doubt useful when keyboard input is pressed, however the mouse_report() also uses it when updating right analog input and thus both dpad to left analog and mouse right analog cannot be used at the same time (extremely useful for mapping first-person shooters, to gyro controls on Switch). I have included Pelsin's updated code and moved the dpad zero function to the line after the preprocess call on kbd_report() and it seems to have fixed the problem.

However, I believe this need testing as I'm not sure of potential conflicts, or edge-cases that might arise from this change in code. I'm only pull requesting it so that others might test it, or help in fixing this. Currently, I have tested it very limitedly on both PC and Switch.

Fran89 avatar Oct 24 '25 07:10 Fran89