Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lebworuxe

Pages: [1]
1
The Cmake build of SFML was way easier than I was expecting.  And also changing that one line worked!  :o  It now reports the accurate number of buttons on those devices, and most importantly reflects the status of the buttons I care about.

The only semi-weird thing is that my initial poll of all the button states still says all 0's sometimes when some are pressed.  For my use, that doesn't matter.

Anyway, I'm happy now with my local build for a while, though it would be nice if this could make it into the mainline eventually.


2
Looking through https://github.com/SFML/SFML/blob/master/src/SFML/Window/Win32/JoystickImpl.cpp. it seems like everything is basically already there for 128 button support that came in the latest DirectInput version.  Is all that's needed a change of https://github.com/SFML/SFML/blob/master/include/SFML/Window/Joystick.hpp#L52 to ButtonCount = 128 ?

If I can figure out https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php, I might try it.  If anyone sees this and knows either this won't work or has some other explanation for my issue, I'd appreciate the info to save the effort.

3
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.   The same program has no issues seeing correct status on a traditional joystick that is also connected.  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. https://www.howtogeek.com/wp-content/uploads/2016/02/xhtx22.png.pagespeed.gp+jp+jw+pj+ws+js+rj+rp+rw+ri+cp+md.ic.Zqbhb1VDNp.png).

sf::Joystick::getIdentification() describes the devices ok, and sf::Joystick::IsConnected() tells me they are both connected, and sf::Joystick::getButtonCount returns 32.   Nonetheless sf::Joystick::isButtonPressed() returns false for all buttons 0-31 no matter what I do.

Any ideas?  Thanks.

Pages: [1]