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

Made timestamp_us of sensor events increase monotonically for Nintendo controllers #6373

Merged

Conversation

happyharryh
Copy link
Contributor

Description

I am testing the sensor data of Nintendo controllers, finding that the new timestamp_us in SDL_ControllerSensorEvent increases un-monotonically, which brings some troubles.

This pull request makes the timestamp_us of Nintendo controllers change monotonically by modifying the order of SendSensorUpdate callings.

The timestamp_us changing:

Old:
    5000 -> 10000 -> 15000 -> 5000 -> 10000 -> 15000 ->
    20000 -> 25000 -> 30000 -> 20000 -> 25000 -> 30000 -> ...

New:
    5000 -> 5000 -> 10000 -> 10000 -> 15000 -> 15000 ->
    20000 -> 20000 -> 25000 -> 25000 -> 30000 -> 30000 -> ...

@slouken slouken merged commit 6f224e4 into libsdl-org:main Oct 11, 2022
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.

None yet

2 participants