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

Apple MFi controller buttons with the example of Nimbus+. Hack for a known Nimbus' problem. #1294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

singalen
Copy link

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.

@AJenbo AJenbo added this to the 1.3.0 milestone Mar 29, 2021
@@ -0,0 +1,23 @@
#SDL Joystick axis mapping (circle-pad)
Copy link
Collaborator

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_) {
Copy link
Collaborator

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 🤷‍♂️

Copy link
Author

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.

Copy link
Collaborator

@yuripourre yuripourre Mar 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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) {
Copy link
Collaborator

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.

@yuripourre
Copy link
Collaborator

yuripourre commented Mar 29, 2021

@singalen Thank you for your contributions, more devs and more controllers supports are always welcome!

I made a few comments, what do you think?

@AJenbo AJenbo modified the milestones: 1.3.0, 1.4.0 Oct 7, 2021
@AJenbo AJenbo modified the milestones: 1.4.0, 1.5.0 Mar 28, 2022
@AJenbo AJenbo removed this from the 1.5.0 milestone Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants