Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send analog button values based on W3C GamePad #1442

Open
wants to merge 1 commit into
base: wpe-2.38
Choose a base branch
from

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#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: [email protected]
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: [email protected]
See: WebPlatformForEmbedded#1410
@modeveci modeveci requested review from pgorszkowski-igalia and removed request for zdobersek December 17, 2024 09:50
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.

3 participants