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

internal/gamepad: a wireless Xbox controller's button assignment seems odd on macOS desktop #266

Closed
hajimehoshi opened this issue Sep 9, 2016 · 5 comments

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Sep 9, 2016

There is no problem on browsers. Is this GLFW problem?

EDIT: The original issue was "Xbox controller is not available on Mac desktop". A wired controller was not available, but a wireless was.

@hajimehoshi
Copy link
Owner Author

PS3 controller worked as intended.

@hajimehoshi hajimehoshi added this to the v2.4.0 milestone Apr 19, 2022
@hajimehoshi hajimehoshi modified the milestones: v2.4.0, v2.5.0 Jul 5, 2022
@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Sep 11, 2022

https://github.com/libsdl-org/SDL/blob/6dfd7a17e1d9ea94015bb0fda4c570f8b20781bd/src/joystick/darwin/SDL_iokitjoystick.c#L496-L501
https://github.com/libsdl-org/SDL/tree/6dfd7a17e1d9ea94015bb0fda4c570f8b20781bd/src/joystick/hidapi

HID API is needed. This is basically the same in Chromium implementation.

GameController.framework would work but I'm not sure this works with SDL's gamepad database.

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Sep 11, 2022

Note that GameController.framework didn't work for an Xbox controller (USB) on macOS. That's odd...

EDIT: Wireless worked, but wired didn't!

@hajimehoshi
Copy link
Owner Author

Even in the current implementation, a wireless Xbox controller worked. The problem is that the button assignment is wrong. I'll take a look..

@hajimehoshi hajimehoshi changed the title Xbox controller is not available on Mac desktop Xbox controller's button assignment seems odd on macOS desktop Sep 11, 2022
@hajimehoshi hajimehoshi changed the title Xbox controller's button assignment seems odd on macOS desktop internal/gamepad: Xbox controller's button assignment seems odd on macOS desktop Sep 11, 2022
@hajimehoshi
Copy link
Owner Author

The left-upper button is always pressed unexpectedly.

image

@hajimehoshi hajimehoshi modified the milestones: v2.5.0, v2.4.3 Sep 11, 2022
hajimehoshi added a commit that referenced this issue Sep 11, 2022
…rectly on macOS

The button and hat values must be adjusted by their minimum values.
See also GLFW's implementation.

Closes #266
@hajimehoshi hajimehoshi changed the title internal/gamepad: Xbox controller's button assignment seems odd on macOS desktop internal/gamepad: a wireless Xbox controller's button assignment seems odd on macOS desktop Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant