Hello, is it currently (or in planning to be) possible to use GLFW to program for a hat switch such as the one on the <a href="http://www.compusa.com/applications/SearchTools/item-details.asp?EdpNo=3109398&CatId=141">Logitech 3D Pro</a>?
I am not a joystick user so can you tell me exactly what is a hat switch. I have at home a pretty old but similar joystick called sidewinder precision pro of Microsoft. Can you tell me if this joystick also has a hat switch as it seems to me. If so I will investigate how much of the different features of the joystick are supported by GLFW and how it is possible to extend support for this kind of device if needed.
The hat switch is the 8 way stick at the very top of the joystick. i’ve done a few tests myself, and GLFW doesn’t seem to recognize that it’s on the stick, it will read the buttons the stick the rotation and the throttle, but it doesn’t know that the 8-way hat is there
Okay, I have the appropriate hardware to do some testing and investigate. Can you open a ticket on the tracker. I will make some tests shortly. I don’t see anything that goes against this button to work. It is not different from a regular button of the joystick (except the fact that there is eight buttons in one.
I just signed up here so i’m not quite sure what you mean by open a ticket on the tracker, sorry for my ignorence.
I did a few investigation of the joystick API. I created a simple test (that still need to be polished slightly to be added to the examples directory) that report the state of the first joystick available every so often. Using this test I discover that my device (with a hat switch/stick) is properly handled by GLFW in the following way:
- the joystick reports six axis for the joystick. The first three are for forward/backward left/right and rotation around the z axis. The fourth axis correspond to the gas/power axis and finally the hat switch/stick are reported by glfw as axis 5 and 6.
I will soon check-in the example (by the end of the week) so that you can test by yourself.
class library… I’m having this issue with the d-pad on a xbox 360 game pad. Windows controller config recognize it as the hat. GLFW not reporting it as an axis or as buttons. Any suggestions (would be v.welcome)? i can look into patching myself if necessary