commit | be9f9f40f79fae8528cd9e5f5fc578c71dc2e545 | [log] [tgz] |
---|---|---|
author | Matt Reynolds <mattreynolds@chromium.org> | Wed Jan 24 22:18:10 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 24 22:18:10 2018 |
tree | 0a3079e4d0aed73eae32be324d145970b2f90c1a | |
parent | cb2ac1ed2fdcd951362067cac957ebf4a852a86c [diff] |
Avoid recreating haptics in GamepadPlatformDataFetcherWin A gamepad may be enumerated twice while its active state is still marked as GAMEPAD_NEWLY_ACTIVE. If this happens, a new XInputHapticGamepadWin instance will be created without properly shutting down the previous instance, causing a DCHECK failure. This situation can occur when a gamepad is enumerated twice before the polling thread polls the gamepad state, which resets all gamepads to GAMEPAD_INACTIVE. To avoid the DCHECK failure, this CL modifies the newly active gamepad logic so the XInputHapticGamepadWin instance is only created if it was previously null. BUG=749295 Change-Id: I1afbe0f6e4f6757384dd37a3491ab6a9cd4313c5 Reviewed-on: https://chromium-review.googlesource.com/883780 Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Matt Reynolds <mattreynolds@chromium.org> Cr-Commit-Position: refs/heads/master@{#531712}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .