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

Unified Diff: device/gamepad/gamepad_provider.cc

Issue 2762003002: Refactor GVR controller gamepad API integration (Closed)
Patch Set: Revert vr_shell_delegate changes, new fetcher/provider API Created 3 years, 9 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
Index: device/gamepad/gamepad_provider.cc
diff --git a/device/gamepad/gamepad_provider.cc b/device/gamepad/gamepad_provider.cc
index 7982918455721a8352065d6eafdc6bef3523c3b8..4539015924f8ec16fd2d1e5e75aec92e92a555fd 100644
--- a/device/gamepad/gamepad_provider.cc
+++ b/device/gamepad/gamepad_provider.cc
@@ -253,7 +253,9 @@ void GamepadProvider::DoPoll() {
PadState& state = pad_states_.get()[i];
if (!state.active_state && state.source != GAMEPAD_SOURCE_NONE) {
- OnGamepadConnectionChange(false, i, buffer->items[i]);
+ auto pad = buffer->items[i];
+ pad.connected = false;
+ OnGamepadConnectionChange(false, i, pad);
ClearPadState(state);
}
}

Powered by Google App Engine
This is Rietveld 408576698