Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joysticks don't zero right with evdev back-end #20

Open
rexroni opened this issue Oct 2, 2015 · 2 comments
Open

Joysticks don't zero right with evdev back-end #20

rexroni opened this issue Oct 2, 2015 · 2 comments

Comments

@rexroni
Copy link

rexroni commented Oct 2, 2015

Dolphin emulator recently changed from the old SDL backend to the new evdev backend (see https://dolphin-emu.org/download/dev/8a50dc857bbfc86c41706a6f48770a6f78285628/?nocr=true).

Now our joysticks won't zero reliably. It seems like every time I set the joystick inputs in dolphin, it comes up with a different (incorrect) zero point. It is as if there's some sort of noise in what the dolphin is reading from the controller or something.

Installing an older build of dolphin returns functionality to our controllers, but is not compatible with the Dolphin Netplay for Project M.

@rexroni rexroni closed this as completed Oct 2, 2015
@rexroni rexroni reopened this Oct 2, 2015
@rexroni
Copy link
Author

rexroni commented Oct 6, 2015

We found a solution to the problem, which was to rebuild dolphin with ENABLE_EVDEV=OFF and ENABLE_SDL=ON.

@francesca64
Copy link

I experienced the same issue, and did some investigating. Believe it or not, this was caused by a subtle oversight in how Dolphin's evdev module calculated axis ranges. I submitted a PR to resolve it, which has now been merged, so this should no longer be an issue.

This driver makes the uncommon choice of using an axis range of (20, 235), as opposed to something more typical, i.e. (0, 255). Dolphin didn't handle that case correctly, and I've found one of the libraries I use has a similar problem. I'd say there are likely more libraries and applications out there with this edgecase, so to avoid potential headaches, you can simply run this program using the --raw flag, enabling "raw mode". In raw mode, there's only one difference: it uses the conventional (0, 255) range. As far as I can tell, there's no downside to doing that; I assume that the intention behind the (20, 235) range was to handle deadzones at a low level, though no clamping happens, so I doubt you gain anything by not using raw mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants