
The joystick setup code is ignoring AxisCount and is hard coded to 32 anyway (just won't let you look at them due to AxisCount), while it does use ButtonCount to set up the buttons. So by the look of it (haven't tested) changing ButtonCount to 128 and AxisCount to 32 in joystick.hpp (and recompiling SFML) should be enough. Currently it's set to 8 axes and 32 buttons (and 4 POVs, but they don't get a count constant).īut the setup code is using a custom format structure with 32 axes, 32 buttons and 4 POVs.īut then the setup code says the number of objects in that struct is 32 axes, 128 buttons and 4 POVs (with 96 buttons undefined) by saying the format was the same size as DIJOYSTATE2 afterall.
#JOYSTICK MAPPER FOR WINDOWS UPDATE#
Looking at the SFML joystick code, it seems at least for Windows they may have forgotten to update the counts.


(It's a pet hate of mine, I've got Virpil hardware with more than 32 buttons and have to use software like Joystick Gremlin and vJoy to redirect my throttle through multiple virtual 32 button devices) Support for 128 buttons came out in 1997 in DirectInput 5.īut we still have games like Elite Dangerous that refuse to support it. Nonetheless sf::Joystick::isButtonPressed() returns false for all buttons 0-31 no matter what I do. Sf::Joystick::getIdentification() describes the devices ok, and sf::Joystick::IsConnected() tells me they are both connected, and sf::Joystick::getButtonCount returns 32. The thing I'm suspicious of is both the flight sim devices have more than 32 buttons which I know DirectX doesn't support, but the buttons I'm interested in all have DirectX ID's less than 32, and for example I can still see the correct button status for the buttons I care about in their Windows properties test popups (e.g.

The same program has no issues seeing correct status on a traditional joystick that is also connected. In my SFML based Windows program, I'm trying to get status of some buttons from two flight simulator devices that show up under windows as USB joysticks, but for neither of them does sf::Joystick::isButtonPressed() ever return anything but "false" even when pressed.
