Open cyberkni opened 9 years ago
I've hacked up a fork of this code to work for me here: https://github.com/cyberkni/EmulationStation/commit/95501cd3236bbe8f514adc3e962249511894c2f5
I'd be happy to take this change further if you provide some direction for me. It seems like there are a few paths to resolution here: 1) Ignore me! Its okay. I can patch my builds. 2) Add options to es_settings.cfg to change the DEADZONE behavior. I think the following options might be sufficient: postive_engage_threshold, negative_engage_threshold. These values would provide upper and lower bounds of the DEADZONE. 3) Like above but as commandline flags 4) Auto-calibration. Perhaps the controller config workflow could change to setting up buttons first, then do directions and use this direction config time to calibrate axes by requiring the user to hold the direction and hit a button.
I have GP-Wiz40 based controls. It provides its 2 joystick inputs by emulating analog joystick axes. However, it does not use -32767,0, and 32767 to indicate direction or centered. Instead it outputs 0 for what should be -32767, 127 for 0 (centered), and 255 for 32767.
This can be fixed for many applications by using jscal on the /dev/input/jsX device and letting the OS scale the values accordingly. However, EmulationStation uses SDL2 which doesn't use the js devices (see here on the SDL2 changelog: https://wiki.libsdl.org/MigrationGuide#Joysticks ). The event based devices have no calibration capability which forces this burden to the applications.
In EmulationStation this means the joysticks won't work, but the buttons do.