Skip to content

Conversation

@ganeshprasads
Copy link

@ganeshprasads ganeshprasads commented Dec 16, 2024

This PR dependent on libWPE changes for getting Gamepad button values from 0.0 to 1.0. WebPlatformForEmbedded/libwpe#134

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.

Original Author: manoj_bhatta@comcast.com
See: #1410

  • Source/WebCore/platform/gamepad/wpe/WPEGamepad.cpp
    (WPEGamepad::WPEGamepad)
    (WPEGamepad::analogButtonChanged)
  • Source/WebCore/platform/gamepad/wpe/WPEGamepad.h:

6aa8bee

Build-Tests Layout-Tests
❌ 🛠 wpe-238-amd64-build ❌ 🧪 wpe-238-amd64-layout
❌ 🛠 wpe-238-arm32-build ❌ 🧪 wpe-238-arm32-layout

This PR dependent on libWPE changes for getting Gamepad button values from 0.0 to 1.0.
WebPlatformForEmbedded/libwpe#133

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.

Original Author: manoj_bhatta@comcast.com
See: WebPlatformForEmbedded#1410
@modeveci modeveci requested review from pgorszkowski-igalia and removed request for zdobersek December 17, 2024 09:50
@magomez magomez merged commit d796615 into WebPlatformForEmbedded:wpe-2.38 Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants