-
Notifications
You must be signed in to change notification settings - Fork 143
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 #1410
Conversation
This PR dependent on lib WPE changes for getting Gamepad button values from 00 to 1.0. https://www.w3.org/TR/gamepad/#dom-gamepadbutton-value value attribute |
void WPEGamepad::analogButtonChanged(unsigned button, double value) | ||
{ | ||
m_lastUpdateTime = MonotonicTime::now(); | ||
m_buttonValues[button].setValue(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we assure that the lower layers will send values between 0 and 1?
would it make sense to clamp or even assert those received values?
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
this issue should be closed in favor of #1442 |
#1442 is the newest implementation of this PR. I close this PR. |
No description provided.