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

Unified Diff: content/browser/gamepad/gamepad_platform_data_fetcher_win.cc

Issue 1136463002: Pass correct length value in WebGamepads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed pending comments Created 5 years, 7 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 | « no previous file | ppapi/examples/gamepad/gamepad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
index fb6c126a9f2eabfbf430d71ff09ff6c6e7ec6570..c563cff49d04f479b9a768d8c9426812541d99ee 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
@@ -97,6 +97,7 @@ void GamepadPlatformDataFetcherWin::EnumerateDevices(
WebGamepads* pads) {
TRACE_EVENT0("GAMEPAD", "EnumerateDevices");
+ pads->length = 0;
// Mark all disconnected pads DISCONNECTED.
for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) {
if (!pads->items[i].connected)
« no previous file with comments | « no previous file | ppapi/examples/gamepad/gamepad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698