Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Event-Driven Gamepad Input API #1000
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
base: main
Are you sure you want to change the base?
Event-Driven Gamepad Input API #1000
Changes from 1 commit
56005d8
1cf12c6
4330752
5654d6e
2d140d9
32a3c72
453e2a1
90c968c
0cfcf31
36b7a7e
0ac8399
39222c4
f8e756e
c8290e4
ad06227
7c08165
0d7c55b
7371348
bde5240
ea5aae2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please also update the root readme.md in MSEdgeExplainers to include this explainer in the active section.
https://github.com/MicrosoftEdge/MSEdgeExplainers?tab=readme-ov-file#active-explainers-
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.
What is the definition of a "frame"?
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.
Input frame definition updated
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.
I don't think that this is correct. In the background we'll be polling as always. I think that what you may is that it will alleviate some strain on the JavaScript main thread that won't need to keep poling gamepad data.
We don't fire input events currently. So, it does seem valid to say this.
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.
Yes, I’m aware that this is the current situation. This comment refers to firing frequent events (as the explainer also proposes) for button up/down, changes, and axis movements. Some users may prefer a single snapshot event to reduce the frequency of individual events being fired, which could help alleviate strain on the JavaScript main thread. There are events for individual button presses and axis changes, as well as the gamepadchange event, which captures the entire gamepad state within an input frame.
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.
I don't think that we should reduce polling intervals though. OS APIs offer polling because applications need to react as fast as possible to user input.