Dear All,
My Xbox 360 controller is not detected under Yosemite 10.10.4! When I plug the controller into my iMac, the lights for 1 - 4 light up very briefly, but then they all switch off. I know the controller works as I've tested it on my PC.
In attempting to diagnose possible coding problems, the errors are as follows: 1) It doesn't detect it at all; and 2) If you do a cout regarding how many buttons there are, it always reports 32.
Code for joystick detection is as follows:
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include "ResourcePath.hpp"
#include <iostream>
int main(int, char const**)
{
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed) {
window.close();
}
if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape) {
window.close();
}
}
window.clear();
if (sf::Joystick::isConnected(0))
std::cout << "Joystick is connected" << std::endl;
window.display();
}
return EXIT_SUCCESS;
}
If anyone can enlighten me as to the solution, I'd be most grateful!
Kind regards,
AshleyF