dd021099ff
Some controllers (notably those made by 8bitdo) do not always emit an event to zero out a D-pad axis before flipping direction. For example, when rolling around aggressively the D-pad of an 8bitdo SN30 Pro/Pro+, the following may be observed: ``` ABS_HAT0X : -1 ABS_HAT0Y : -1 ABS_HAT0Y : 0 ABS_HAT0Y : 1 ABS_HAT0X : 1 ``` Notable here is that no event for `ABS_HAT0X: 0` is emitted between the events for `ABS_HAT0X: -1` and `ABS_HAT0X: 1`. Consequently, the game engine believes that both the negative _and_ positive x-axis directions of the D-pad are activated simultaneously (i.e `is_joy_button_pressed()` returns `true` for both `JOY_BUTTON_DPAD_LEFT` and `JOY_BUTTON_DPAD_RIGHT`), which should be impossible. This issue is _not_ reproducible on all controllers. The Xbox One controller in particular will not exhibit this problem (it always emits zeroing out events for an axis before flipping direction). The fix is to always zero out the opposite direction on the D-pad axis in question when processing an event with a nonzero value. This unfortunately wastes a small number of CPU cycles on controllers that behave nicely. **I have verified this issue is also reproducible in the stable 3.2 branch** |
||
---|---|---|
.. | ||
export | ||
context_gl_x11.cpp | ||
context_gl_x11.h | ||
crash_handler_linuxbsd.cpp | ||
crash_handler_linuxbsd.h | ||
detect_prime_x11.cpp | ||
detect_prime_x11.h | ||
detect.py | ||
display_server_x11.cpp | ||
display_server_x11.h | ||
godot_linuxbsd.cpp | ||
joypad_linux.cpp | ||
joypad_linux.h | ||
key_mapping_x11.cpp | ||
key_mapping_x11.h | ||
logo.png | ||
os_linuxbsd.cpp | ||
os_linuxbsd.h | ||
pck_embed.ld | ||
pck_embed.legacy.ld | ||
platform_config.h | ||
platform_linuxbsd_builders.py | ||
SCsub | ||
vulkan_context_x11.cpp | ||
vulkan_context_x11.h |