-
-
Notifications
You must be signed in to change notification settings - Fork 474
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: ignore gamepads that are masked by steam input to prevent dublicated inputs #3470
fix: ignore gamepads that are masked by steam input to prevent dublicated inputs #3470
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
thanks for this, ill test soon |
return valveGamepads.find( | ||
(valveGamepad) => | ||
valveGamepad && | ||
Math.abs(valveGamepad.timestamp - gamepad.timestamp) <= 10 |
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.
why is this needed btw? (the math.abs)
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.
sadly the timestamps of the masked gamepad and steam input gamepad are not identical. most of the time there is a difference of 5, but sometimes it is up to 8. Therefore i used 10 to be sure to catch the masked gamepad. sadly the nearly identical timestamp is the only thing they have in common.
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.
@Etaash-mathamsetty i added some jsDoc to clarify the filtering. I hope this helps a bit.
After adding jsDoc comments the code check and test task fail in files i did not change. Could you explain and help me with this?
@bmsuseluda I'm testing this and it seems to work as expected, but there are some code check and test failures, can you check that? I think you only need to get this branch up to date with the main branch |
@arielj thanks for the tip. the checks are green again 😃 |
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.
thanks! I'll merge this
<--- Put the description here --->
Fixes #989
Use the following Checklist if you have changed something on the Backend or Frontend: