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

Author Topic: Mac external trackball not detected / IOHIDElementGetDevice Crash  (Read 3022 times)

0 Members and 1 Guest are viewing this topic.

zenroth

  • Newbie
  • *
  • Posts: 26
    • View Profile
So I've been using some of the old RC 2.0 code for probably a good year or two without problems, however it seems I've ran into an issue now. I'm now using a Logitech m570 wireless trackball, and games instantly crash when checking for a mouse press. This is likewise present in our previous commercial releases. The crash seems to happen at IOHIDElementGetDevice.

Now I downloaded the latest SFML and I no longer seem to get a crash, but the trackball does not work at all. Debugging the code a bit it seems like SFML detects 3 mice with the following button counts 940,7,39. This seems strange to me, as I would have expected at most 2 mice to be detected, but I'm not familiar with this API any.

Some left, right and other buttons do get detected and added to the m_Buttons array, but in the end the trackball buttons seem to do nothing.

I also checked out some games like FTL that use SDL and the trackball seems to work fine there, so it seems like its not a global issue. The trackball also works fine under SFML and Windows.


« Last Edit: May 05, 2013, 08:23:28 pm by zenroth »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Mac external trackball not detected / IOHIDElementGetDevice Crash
« Reply #1 on: May 05, 2013, 10:06:28 pm »
The thing is, there is pretty much no documentation about IOHID API. And not having such device makes it really hard for me to test my code..

If I find some free time I'll go dig into SDL code to see what they are doing better. But this is unlikely to happen soon unfortunately.

Of course, any (good :-) ) contribution on that particular topic is welcome.
SFML / OS X developer

zenroth

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Mac external trackball not detected / IOHIDElementGetDevice Crash
« Reply #2 on: May 05, 2013, 10:34:37 pm »
Understood, I'll see what I can figure out with it. I was surprised that most of the IOH objects seemed to have no information exposed in the debugger. Didn't look very friendly to say the least.

zenroth

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Mac external trackball not detected / IOHIDElementGetDevice Crash
« Reply #3 on: May 06, 2013, 12:58:09 am »
So this seems to be a bigger issue. Multi-mouse support in general seems to not be working.
If i connect a regular usb mouse into my macbook pro, no clicks are detected, only clicks from the touchpad register.

I'm unfortunately unclear why this is.. Ive added a ton of debug stuff to the IOH code and it sees the usb optical mouse, detects the buttons, adds it to the m_Buttons array, but when checking in IsMouseButtonDown the IOH value always comes back as 0.

zenroth

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Mac external trackball not detected / IOHIDElementGetDevice Crash
« Reply #4 on: May 06, 2013, 01:23:56 am »
Also note that mouse events work fine with the trackball and other external mice, it seems like its only the IOH api that isn't working..

A quick examination of SDL and glfw both seem to indicate that neither use IOH for mouse or keyboard handling, unless I missed something.