-
Notifications
You must be signed in to change notification settings - Fork 793
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
Apple MFi controller buttons with the example of Nimbus+. Hack for a known Nimbus' problem. #1294
base: master
Are you sure you want to change the base?
Conversation
…known Nimbus' problem.
@@ -0,0 +1,23 @@ | |||
#SDL Joystick axis mapping (circle-pad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo those changes should be defined during the cmake step:
cmake .. -DJOY_AXIS_LEFTX=0
...
Maybe adding this to the wiki page would be a good idea. But let's see what others think.
// Work around Nimbus that reports inverted Y. No known fix, | ||
// AFAIK, and no SDL remapping. | ||
// https://forums.libsdl.org/viewtopic.php?p=51409 | ||
if (nimbus_axis_hack_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be a more general flag option for the ini. Something like: "Joystick Invert Y-Axis".
It could even use it as a feature 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure about the usefulness of such a feature outside of this specific vendor, so I'd like to open a discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inverted YAxis might happen with other joysticks:
mdqinc/SDL_GameControllerDB#162 (comment)
https://discourse.glfw.org/t/positive-gamepad-axis-directions/956/11
@@ -263,6 +270,11 @@ void Joystick::Add(int device_index) | |||
#ifndef USE_SDL1 | |||
result.instance_id_ = SDL_JoystickInstanceID(result.sdl_joystick_); | |||
#endif | |||
if (strstr(SDL_JoystickNameForIndex(device_index), "Nimbus") != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove it if you move it to options.
@singalen Thank you for your contributions, more devs and more controllers supports are always welcome! I made a few comments, what do you think? |
This is not a complete PR (it's ugly to put a hack code into a core class), but rather a request for comment.
I was curious what it would take to get my controller working.