WebPlatformForEmbedded / libwpe

General-purpose library specifically developed for the WPE-flavored port of WebKit.
BSD 2-Clause "Simplified" License
49 stars 36 forks source link

Analog button values from 0.0 to 1.0 #133

Open mbhatt627 opened 1 month ago

mbhatt627 commented 1 month ago

Analog button should have values from 0.0 to 1.0 instead of only digital value.

https://www.w3.org/TR/gamepad/#dom-gamepadbutton-value

value attribute For buttons that have an analog sensor, this property MUST represent the amount which the button has been pressed. All button values MUST be linearly normalized to the range [0.0 .. 1.0]. 0.0 MUST mean fully unpressed, and 1.0 MUST mean fully pressed. For buttons without an analog sensor, only the values 0.0 and 1.0 for fully unpressed and fully pressed respectively, MUST be provided.

aperezdc commented 4 days ago

@mbhatt627 Could you update the PR taking into account the suggestions? Thanks in advance 🙇🏼