After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783927 - Allow more events to be recognized as axes
Allow more events to be recognized as axes
Status: RESOLVED FIXED
Product: gnome-games
Classification: Core
Component: general
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-18 17:24 UTC by Abhinav Singh
Modified: 2017-06-19 07:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gamepad: Send axis events for unhandled absolute axes (1.18 KB, patch)
2017-06-19 07:06 UTC, Adrien Plazas
committed Details | Review

Description Abhinav Singh 2017-06-18 17:24:46 UTC
Currently only ABS_X, ABS_Y, ABS_RX, ABS_RY are being recognised as axes. Some gamepads like my Quantum QHM7468-2A use ABS_RZ instead of the ones that are recognised.
Comment 1 Abhinav Singh 2017-06-18 17:31:58 UTC
Adrien suggested that all absolute axes events other than the hats should be recognised as axes and trigger the EVENT_GAMEPAD_AXIS.

Here are my observations for it:
* My gamepad is weird and evtest shows that it keeps signalling ABS_Z event even when nothing is pressed.
* The value of ABS_Z is ~127 but when I move around my left thumbstick, ABS_Z becomes equal to the value of ABS_X.

Hence, when I try to map my ABS_X to some input, I accidentally map ABS_Z to the next input.
Comment 2 Adrien Plazas 2017-06-19 06:04:56 UTC
(In reply to Abhinav Singh from comment #1)
> Here are my observations for it:
> * My gamepad is weird and evtest shows that it keeps signalling ABS_Z event
> even when nothing is pressed.
> * The value of ABS_Z is ~127 but when I move around my left thumbstick,
> ABS_Z becomes equal to the value of ABS_X.
> 
> Hence, when I try to map my ABS_X to some input, I accidentally map ABS_Z to
> the next input.

That's weird… but it looks like a bug in your gamepad itself, I'm not sure we can do anything about it. :/
Comment 3 Adrien Plazas 2017-06-19 07:06:12 UTC
Created attachment 354017 [details] [review]
gamepad: Send axis events for unhandled absolute axes

The axis events which weren't hats, X, Y, RX or RY wheren't handled and
ended up being sent as "nothing" events.

This make events from these unhandled axes be notified as axis events,
just like the ones from X, Y, RX and RY.
Comment 4 Adrien Plazas 2017-06-19 07:07:57 UTC
Attachment 354017 [details] pushed as a53a3cb - gamepad: Send axis events for unhandled absolute axes