286
Window / Re: Win10 Joysticks have more than 32 buttons, can't get status on any of them
« on: May 13, 2021, 11:52:27 am »
Ok, I was slightly wrong there. SFML does allow you to query how many buttons are really on a joystick, but clamps the value to 32 max. But there's no way to query how many axes or POVs there are.
Another issue, it sets up the Direct Input format for 4 groups of analog values, each having 6 axes and 2 sliders (so 4*(6+2)=32 total). Plus there's 4 POVs. But then says there's only 8 axes possible, and returns a single POV as the 7th and 8th axes, which should be the first 2 sliders.
An example of a common device that would break this limit if fully supported: Playstation controller. A DualShock4 controller has 16 analog axes:
- left thumb x
- left thumb y
- right thumb x
- right thumb y
- left trigger
- right trigger
- touchpad finger 1 x
- touchpad finger 1 y
- touchpad finger 2 x
- touchpad finger 2 y
- IMU gyro pitch
- IMU gyro yaw
- IMU gyro roll
- IMU acceleration x
- IMU acceleration y
- IMU acceleration z
Of course DirectInput only shows the first 6, but the rest are there if you go down to the HID level like I do.
Anyway, you got your issue working, I'll stop ranting now.
Another issue, it sets up the Direct Input format for 4 groups of analog values, each having 6 axes and 2 sliders (so 4*(6+2)=32 total). Plus there's 4 POVs. But then says there's only 8 axes possible, and returns a single POV as the 7th and 8th axes, which should be the first 2 sliders.
An example of a common device that would break this limit if fully supported: Playstation controller. A DualShock4 controller has 16 analog axes:
- left thumb x
- left thumb y
- right thumb x
- right thumb y
- left trigger
- right trigger
- touchpad finger 1 x
- touchpad finger 1 y
- touchpad finger 2 x
- touchpad finger 2 y
- IMU gyro pitch
- IMU gyro yaw
- IMU gyro roll
- IMU acceleration x
- IMU acceleration y
- IMU acceleration z
Of course DirectInput only shows the first 6, but the rest are there if you go down to the HID level like I do.
Anyway, you got your issue working, I'll stop ranting now.