Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: third_party/WebKit/Source/modules/gamepad/Gamepad.cpp

Issue 2150173002: Added Touched attribute to GamepadButton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually remove unnecessary test. Not sure what happened last time. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/ppb_gamepad_shared.h ('k') | third_party/WebKit/Source/modules/gamepad/GamepadButton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
diff --git a/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp b/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
index 94766f0c5391b9623a2fa63332cbfde212a60e76..26b135aee9faf7242b201e3e3244d263cfd259f9 100644
--- a/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
+++ b/third_party/WebKit/Source/modules/gamepad/Gamepad.cpp
@@ -54,6 +54,7 @@ void Gamepad::setButtons(unsigned count, const WebGamepadButton* data)
for (unsigned i = 0; i < count; ++i) {
m_buttons[i]->setValue(data[i].value);
m_buttons[i]->setPressed(data[i].pressed);
+ m_buttons[i]->setTouched(data[i].touched || data[i].pressed || (data[i].value > 0.0f));
}
}
« no previous file with comments | « ppapi/shared_impl/ppb_gamepad_shared.h ('k') | third_party/WebKit/Source/modules/gamepad/GamepadButton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698