I wanted to try to get everything controller-related working with SFML before trying my luck with xinput, but the title says the problem. I have an xbox one controller, a steel series controller, and 2 logitec gamepads. The only one that SFML can read for me is the xbox one controller.
while (window.isOpen())
{
//get player pressing escape to close the game
if (Keyboard::isKeyPressed(Keyboard::Escape) || sf::Joystick::isButtonPressed(0, 2))
{
window.close();
}
window.clear();//clears the window to draw the next frame
sf::Joystick::update();
window.display();
}
Just trying to see if "x" is pressed on the controller to close the window (still learning everything). No problems with the xbox controller and nothing happens with the other ones.