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

Author Topic: SFML 2.3.1 not detecting Xbox 360 Controller under Mac Yosemite  (Read 4505 times)

0 Members and 1 Guest are viewing this topic.

AshleyF

  • Newbie
  • *
  • Posts: 30
    • View Profile
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
« Last Edit: August 04, 2015, 05:36:23 pm by eXpl0it3r »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.3.1 not detecting Xbox 360 Controller under Mac Yosemite
« Reply #1 on: August 04, 2015, 05:47:00 pm »
Quote
When I plug the controller into my iMac, the lights for 1 - 4 light up very briefly, but then they all switch off
So you mean that they are supposed to stay on? In this case, it's rather a driver issue with your Mac. Make sure that it works on the Mac before trying to use it with SFML.
Laurent Gomila - SFML developer

AshleyF

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: SFML 2.3.1 not detecting Xbox 360 Controller under Mac Yosemite
« Reply #2 on: August 04, 2015, 09:17:36 pm »
Dear Laurent,

Thank you very much for your reply. After using Google, I have discovered one possible driver for the Xbox controller. It is located at:

http://www.macupdate.com/app/mac/24762/xbox-360-controller-driver

Before I install this, could you please check with Marco if it's what he'd advise!

Kind regards,

AshleyF

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: SFML 2.3.1 not detecting Xbox 360 Controller under Mac Yosemite
« Reply #3 on: August 04, 2015, 09:27:17 pm »
I would not recommend any software from that kind of website, you never know what you actually download and there's no proper link to the origin of the software.

One comment is especially funny: someone wrote 'how do i download it' and put 5/5 stars... ::)

However, this one is more interesting:

Quote from:  mele113
Is Not compatible with Yosemite OSX so don't bother wasting time on this one ...no support nor info in regards to Mountain Lion, Mavericks or Yosemite.....compatibility

There's also this link in the comment: https://github.com/d235j/360Controller/ but it seems rather dead (or maybe not?) so... at your own risks.



I don't own a Xbox controller but with the PS3 one, there's a trick to make it work properly: first connect it with USB then activate the bluetooth connection and finally unplug it. No special driver involved. Maybe something similar will work for you?
« Last Edit: August 04, 2015, 09:32:52 pm by Hiura »
SFML / OS X developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML 2.3.1 not detecting Xbox 360 Controller under Mac Yosemite
« Reply #4 on: August 04, 2015, 09:33:03 pm »
In general, I would download drivers only from the official manufacturer's website. You cannot verify whether third-party sites are trustworthy, and you can easily install malware or spyware without ever noticing (no, anti-virus software won't necessarily protect you). Thus it's really a risk you should not carelessly take.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

AshleyF

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: SFML 2.3.1 not detecting Xbox 360 Controller under Mac Yosemite
« Reply #5 on: August 04, 2015, 09:36:16 pm »
Dear Hiura,

Thank you very much for your kind reply.

I've just ordered a PC/Mac compatible joystick that doesn't need drivers. Hopefully that'll solve the problem!

Kind regards,

AshleyF

 

anything