- From: Matt Reynolds <notifications@github.com>
- Date: Thu, 13 Jun 2024 15:44:51 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/gamepad/pull/196/review/2117139006@github.com>
@nondebug commented on this pull request.
> @@ -820,8 +820,13 @@ <h3>
<li>[=list/For each=] |rawInputIndex:long| of [=the range=] from 0 to
|inputCount| − 1:
<ol>
- <li>If the the gamepad button at index |rawInputIndex|
- [=represents a Standard Gamepad button=]:
+ <li>Let |button| be the button at index |rawInputIndex|.
Assigning the button to a variable |button| seems awkward. |button| doesn't have a defined type, it's intended to represent a specific physical button under some device-defined button ordering. Let's reword this to avoid assigning it to anything.
```
<li>Let |type| be the result of determining if the button at index |rawInputIndex|
[=represents a Standard Gamepad button=] or...
</li>
```
> @@ -878,8 +883,14 @@ <h3>
<li>Initialize |buttons| to be an empty [=list=].
</li>
<li>[=list/For each=] |buttonIndex:long| of [=the range=] from 0 to
- |buttonsSize| − 1, [=list/append=] a [=new=] {{GamepadButton}} to
- |buttons|.
+ |buttonsSize| − 1:
+ <ol>
+ <li>Let |button:GamepadButton| be a [=new=] {{GamepadButton}} with its
+ {{GamepadButton/type}} attribute initialized to |type|.
We're initializing button.type but the remaining GamepadButton attributes are left uninitialized. Let's specify that button.value is initialized to zero and button.pressed and button.touched are initialized to false.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/196#pullrequestreview-2117139006
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/gamepad/pull/196/review/2117139006@github.com>
Received on Thursday, 13 June 2024 22:44:55 UTC