In SDL2 how do I get the Axis ranges of a joystick?

46 Views Asked by At

How to get SDL2 joystick to return axis values in the same range? Some devices returns values in range (0-32767), others (-32767 - 32767). For example, i connected the Radiomaster Boxer RC controller to windows PC and right stick is full range and left is only half.

I want to create a binding interface so user can bind any axis of any gamepad to a specific rc channel, but it is impossible if I don't know which axis is full range and which is not. I need to know the range of the device before I can normalize it.

I tried to read both jaxis and caxis event, but it holds the same values. I also looked for axis properties like min/max value, but could not find any.

0

There are 0 best solutions below