Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ares is mixing up controllers in MacOS #1708

Open
jeremiahrose opened this issue Dec 4, 2024 · 2 comments
Open

ares is mixing up controllers in MacOS #1708

jeremiahrose opened this issue Dec 4, 2024 · 2 comments

Comments

@jeremiahrose
Copy link

In ares 141 on MacOS 14.6,

When I have two Xbox wireless controllers connected to the Mac (and working fine in other applications), and I map the first controller to port 1 and the other to port 2, ares seems to confuse these controllers with each other, e.g:

  • Closing ares and restarting it sometimes results in the controllers being switched
  • The controller that was previously binded as player one (in a single player game) stops working, when I reach for the other controller that one has become player one.
  • The binding that's set in the settings is sometimes not obeyed by a running game, e.g if I bind a button on controller 1, the will only receive the button press from controller 2.
@Sintendo
Copy link
Contributor

Sintendo commented Dec 4, 2024

Issue is we're not calling setPathID in the IOKit implementation: https://github.com/ares-emulator/ares/blame/master/ruby/input/joypad/iokit.cpp#L204

As a result, we distinguish controllers only by vendor and product ID, which will be the same if you use identical controllers.

The question is: where do we get a value that can uniquely identify a controller on macOS? On Windows we use a hash of the USB device path, not sure if there's something similar to use on macOS.

@jcm93
Copy link
Contributor

jcm93 commented Dec 4, 2024

Irrespective of the above issue, I would definitely not recommend using the IOKit input driver; I have considered trying to deprecate/remove it. For controllers it's particularly unsuitable; there is no normalization of stick input or any standard features of a "modern" controller driver. It's more an API designed to write controller drivers with rather than a controller driver itself.

Can you confirm that you are in fact using the IOKit input driver, and if so, check if the same thing occurs using SDL for input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants