hi
tested this code to see if my gamepad was detected, but no
ok with steam and dowloaded joystick tester and ok with it.
also ok in windows joystick configuration
thanks
#include <iostream>
#include <SFML/Window/Joystick.hpp>
int main()
{
unsigned int joystckID{0};
sf::Joystick myJoystick;
while(joystckID < 8) {
if (myJoystick.isConnected(joystckID)) {
unsigned int buttonCount = myJoystick.getButtonCount(joystckID);
std::cout << "joystick ID " << joystckID << " conneted with" << buttonCount << " buttons.\n";
}
else { std::cout << "joystick ID " << joystckID << " not conneted\n"; }
++joystckID;
}
while(1) {
if (sf::Joystick::isButtonPressed(0, 1)) { std::cout << "button 1 pressed\n"; }
}
return 0;
}