Changeset 268390 in webkit
- Timestamp:
- Oct 13, 2020 2:20:44 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268386 r268390 1 2020-10-13 Adrian Perez de Castro <aperez@igalia.com> 2 3 [GTK] Make gamepads visible after their first input is received 4 https://bugs.webkit.org/show_bug.cgi?id=217494 5 6 Reviewed by Carlos Garcia Campos. 7 8 Turns out this was mostly working already, with a small caveat: Sometimes there would 9 be a timing issue if m_inputNotificationTimer would be fired before having a chance 10 of setting the m_initialGamepadsConnected flag, and in that case the early return 11 would prevent dispatchPlatformGamepadInputActivity() from ever being called. This 12 re-arms the timer to be fired again in the next event loop iteration if the flag was 13 unset, so it will be checked again after it has been toggled. This same approach is 14 used by HIDGamepadProvider in the Mac port, for example. 15 16 * platform/gamepad/manette/ManetteGamepadProvider.cpp: 17 (WebCore::ManetteGamepadProvider::inputNotificationTimerFired): Re-arm timer if 18 m_initialGamepadsConnected was not yet set. 19 1 20 2020-10-13 Kimmo Kinnunen <kkinnunen@apple.com> 2 21 -
trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.cpp
r268312 r268390 174 174 void ManetteGamepadProvider::inputNotificationTimerFired() 175 175 { 176 if (!m_initialGamepadsConnected) 176 if (!m_initialGamepadsConnected) { 177 if (!m_inputNotificationTimer.isActive()) 178 m_inputNotificationTimer.startOneShot(0_s); 177 179 return; 180 } 178 181 179 182 dispatchPlatformGamepadInputActivity();
Note: See TracChangeset
for help on using the changeset viewer.