- From: Marcos Cáceres <notifications@github.com>
- Date: Tue, 15 Jun 2021 07:21:05 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/pull/151/review/684076014@github.com>
@marcoscaceres commented on this pull request. > + To <dfn>update gamepad state</dfn> for |gamepad|, run the following steps: + </p> + <ol> + <li>Let |now| be the [=current high resolution time=]. + <li>Set |gamepad|.{{Gamepad/timestamp}} to |now|. + <li>Run the steps for <a>map and normalize axes</a> with |gamepad|. + <li>Run the steps for <a>map and normalize buttons</a> with |gamepad|. + <li>If |navigator|.{{Navigator/[[hasGamepadGesture]]}} is `false` and |gamepad| <a>contains a gamepad user gesture</a>: + <ol> + <li>Set |navigator|.{{Navigator/[[hasGamepadGesture]]}} to `true`. + <li>For each |connectedGamepad:Gamepad| of |navigator|.{{Navigator/[[gamepads]]}}: + <ol> + <li>If |connectedGamepad| is not `null`: + <ol> + <li>Set |connectedGamepad|.{{Gamepad/timestamp}} to |now|. + <li>[[=Fire an event=]] named `"gamepadconnected"` at |window:Window| using {{GamepadEvent}} with its {{GamepadEvent/gamepad}} attribute initialized to |connectedGamepad|. ```suggestion <li>[=Fire an event=] named `"gamepadconnected"` at |window:Window| using {{GamepadEvent}} with its {{GamepadEvent/gamepad}} attribute initialized to |connectedGamepad|. ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/gamepad/pull/151#pullrequestreview-684076014
Received on Tuesday, 15 June 2021 14:21:57 UTC