w3c / gamepad

Gamepad
https://w3c.github.io/gamepad/
Other
139 stars 49 forks source link

Fast button presses could get lost #77

Open larsgk opened 5 years ago

larsgk commented 5 years ago

Quickly pressing/releasing buttons could get lost between calls to navigator.getGamepads()

I fully understand why the API uses a polling mechanism (and not events) to e.g. prevent 'data overflow' of analog axis events, but perhaps it could be possible to include a history on each button with timestamps and data if more than one change happened since last call to getGamepads().

This is only really an issue if the framerate drops, of course.

marcoscaceres commented 5 years ago

Suggestion would be to add a button history array for v2.

JonathanILevi commented 3 years ago

It does not matter what the solution is, but this is a serious issue that needs fixed. Modern web APIs should not still have this problem. The API is the core which abstractions can be built on, it is poor quality when it cannot efficiently reproduce the information the underlying system already has.

I would be pleased to see any of many solutions to the problem implemented.

reillyeon commented 3 years ago

When discussing this issue please keep in mind the W3C's Code of Ethics and Professional Conduct. Then language used in the comment above is unnecessary to effectively communicate the issues with the current design.

JonathanILevi commented 3 years ago

You're right, I fixed the strong language.