chrippa / ds4drv

A Sony DualShock 4 userspace driver for Linux
MIT License
1.05k stars 213 forks source link

Support for circular axis #27

Open Ape opened 10 years ago

Ape commented 10 years ago

Many gamepads report the gamepad axis data with circular maximum values. That means that the 2 dimensional distance from axis center is never more than the maximum value of a single axis. DualShock 4 reports almost, but not quite, square axis. There's more explanation about the idea on xboxdrv man page, see --square-axis.

The square axis causes issues especially when combined with --emulate-xpad and games that expect circular axis. I suggest that we add something like --circular-axis that maps the input values (inverse of xboxdrv's --square-axis). --emulate-xpad should probably imply this option as it's required for full emulation.

chrippa commented 10 years ago

Do you have an example of a game that is affected by this?

benmoran56 commented 10 years ago

I ran into this issue with La-Mulana in Wine. It's almost impossible to do Up+Left or Up+Right on the analog stick at the same time, making jumping difficult. La-Mulana is a free game, but it might be difficult to test because it requires lots of special dll configuration. Sorry I don't know any others.

I don't think many (any?) games need --square-axis these days, but it might be a useful option for some older titles.