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

fix autorepeat not being triggered when inside deadzone #261

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

marcbone
Copy link

@marcbone marcbone commented Aug 3, 2023

I experienced the same issue that was mentioned in #260.

In short, with this PR autorepeat also works when you move the joystick inside the deadzone

when the joystick is moved there is an SDL_Event, but when inside the deadzone the position of the joystick will not be updated. In this case should_publish remains false. However, before this commit we would not trigger the autorepeat functionality in this case.

Now we trigger the autorepeat functionality everytime where we didnt update the joystick (due to deadzone) or when there was no SDL_Event.
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Yeah, this looks like a reasonable fix. I updated the comment to explain what we are doing. Thank you!

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.

2 participants