Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: afb79e1a6b1c124a105769be957d7fe3c7b7b800
https://github.com/WebKit/WebKit/commit/afb79e1a6b1c124a105769be957d7fe3c7b7b800
Author: Simon Pena <[email protected]>
Date: 2026-03-06 (Fri, 06 Mar 2026)
Changed paths:
M Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
M Source/WebKit/UIProcess/Gamepad/wpe/GamepadProviderWPE.cpp
M Source/WebKit/UIProcess/Gamepad/wpe/PlatformGamepadWPE.cpp
M Source/WebKit/UIProcess/Gamepad/wpe/PlatformGamepadWPE.h
M Source/WebKit/WPEPlatform/wpe/WPEGamepad.cpp
M Source/WebKit/WPEPlatform/wpe/WPEGamepad.h
M Source/WebKit/WPEPlatform/wpe/WPEGamepadManette.cpp
Log Message:
-----------
[WPE] Implement playEffect by supporting gamepad rumble
https://bugs.webkit.org/show_bug.cgi?id=309269
Reviewed by Carlos Garcia Campos.
This implements playEffect and stopEffects in GamepadProviderWPE by
dispatching a playEffect request to PlatformGamepadWPE, which routes it
to WPEGamepad.
WPEGamepad defines new has_rumble and rumble methods, and a
libmanette-based implementation is provided. playEffect is then mapped
into a rumble call, gating it by the specific effect being supported.
The concrete libmanette-based implementation does a version check, since
prior to 0.2.13 the API expected uints, and afterwards doubles like the
gamepad spec.
defaultGamepadVibrationActuatorEnabled is therefore enabled for WPE
Platform.
Tested manually on https://hardwaretester.com/gamepad.
* Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultGamepadVibrationActuatorEnabled):
* Source/WebKit/UIProcess/Gamepad/wpe/GamepadProviderWPE.cpp:
(WebKit::GamepadProviderWPE::gamepadDisconnected):
(WebKit::GamepadProviderWPE::playEffect):
(WebKit::GamepadProviderWPE::stopEffects):
* Source/WebKit/UIProcess/Gamepad/wpe/PlatformGamepadWPE.cpp:
(WebKit::PlatformGamepadWPE::PlatformGamepadWPE):
(WebKit::PlatformGamepadWPE::playEffect):
(WebKit::PlatformGamepadWPE::stopEffects):
(WebKit::PlatformGamepadWPE::effectDelayTimerFired):
(WebKit::PlatformGamepadWPE::startRumble):
(WebKit::PlatformGamepadWPE::effectDurationTimerFired):
* Source/WebKit/UIProcess/Gamepad/wpe/PlatformGamepadWPE.h:
* Source/WebKit/WPEPlatform/wpe/WPEGamepad.cpp:
(wpe_gamepad_has_rumble):
(wpe_gamepad_rumble):
* Source/WebKit/WPEPlatform/wpe/WPEGamepad.h:
* Source/WebKit/WPEPlatform/wpe/WPEGamepadManette.cpp:
(wpeGamepadManetteHasRumble):
(wpeGamepadManetteRumble):
(wpe_gamepad_manette_class_init):
Canonical link: https://commits.webkit.org/308792@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications