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

Unified Diff: content/shell/renderer/test_runner/gamepad_controller.cc

Issue 165983005: Updating Gamepad API to match latest spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo in GamepadProviderTest Created 6 years, 10 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 | « content/content_browser.gypi ('k') | ppapi/shared_impl/ppb_gamepad_shared.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/gamepad_controller.cc
diff --git a/content/shell/renderer/test_runner/gamepad_controller.cc b/content/shell/renderer/test_runner/gamepad_controller.cc
index fa584438c2c5af1523d6c6f94a3a8ff340f76f95..576469d5f2157c7311b173ec428092d0cb7c2d91 100644
--- a/content/shell/renderer/test_runner/gamepad_controller.cc
+++ b/content/shell/renderer/test_runner/gamepad_controller.cc
@@ -197,7 +197,8 @@ void GamepadController::SetButtonData(int index, int button, double data) {
return;
if (button < 0 || button >= static_cast<int>(WebGamepad::buttonsLengthCap))
return;
- gamepads_.items[index].buttons[button] = data;
+ gamepads_.items[index].buttons[button].value = data;
+ gamepads_.items[index].buttons[button].pressed = data > 0.1f;
if (delegate_)
delegate_->setGamepadData(gamepads_);
}
« no previous file with comments | « content/content_browser.gypi ('k') | ppapi/shared_impl/ppb_gamepad_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698