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

Implement controller rumble support to ui/Gamepad #1739

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

cuckydev
Copy link

@cuckydev cuckydev commented Jan 3, 2024

This PR adds a controller rumble method to the ui/Gamepad class.
At this time, it only implements the native/SDL2 backend. HTML5 should be simple as well, although browser support for rumble is lacking as of writing this.

Closes #869

@ninjamuffin99
Copy link
Contributor

I've tested this as working!

gameController = other.gameController;
other.gameController = temp;
return *this;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be clearer to define a Swap() function instead of overriding an operator?

Copy link
Contributor

Choose a reason for hiding this comment

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

was this the final thing that needed to be addressed for this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know about "final" or otherwise. This was just something I was curious about.

Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw, op overloading does seem to make, otherwise seemingly straightforward code have oddly obfuscated behavior

* whitespacing real.. please!

* nativecffi rumble thing fix lol
@ninjamuffin99
Copy link
Contributor

many of the whitespacing/formatting issues should be fixed up now @player-03 and the changes should be easier to parse through and read!

@Geokureli
Copy link
Contributor

Any updates on this?

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.

Add vibration support to Gamepad and Joystick APIs
4 participants