mdqinc / SDL_GameControllerDB

A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality
http://libsdl.org
zlib License
1.38k stars 520 forks source link

Added missing mapping for triggers on Logitech F310 #731

Closed IovlevYuliy closed 10 months ago

IovlevYuliy commented 10 months ago

The mapping for triggers were absent for Logitech F310 in Windows section. Tested on two gamepads.

offalynne commented 10 months ago

Looks like this needs a bit of workshopping.

lefttrigger:a2 indicates the full range of -1 to 1 of axis 2 is for left trigger

righttrigger:-a2 indicates half the range (-1 to 0) of axis 2 is for right trigger

This doesn't make sense, as there is then overlap between left and right and they will both be engaged in the -1 to 0 range. It's possible what you want is lefttrigger:+a2,righttrigger:-a2 (or perhaps other way around), though that also seems a bit weird. This situation resembles the conflict between trigger values when XInput devices are accessed over DInput where there's no real way to tell independent trigger input apart, since they both act on the same axis.

If you can test a bit more and clarify what you're seeing, please do.

IovlevYuliy commented 10 months ago

Thank you for your clarification! You are right, the gamepad was in XInput mode and there is a toggle for switching it to DInput mode. After that I get independent axes for both triggers, but anyway mapping for triggers are missing, I updated PR with proper mapping.

lefttrigger:a2
righttrigger:a5