[webkit-changes] [WebKit/WebKit] c7f153: Make Gamepad.vibrationActuator work with the GameC...

Chris Dumez noreply at github.com
Mon Jan 9 11:09:54 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c7f1532632f76bad38f73f3718c79d1363ee7abf
      https://github.com/WebKit/WebKit/commit/c7f1532632f76bad38f73f3718c79d1363ee7abf
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M Source/WebCore/Modules/gamepad/GamepadHapticEffectType.h
    M Source/WebCore/Modules/gamepad/GamepadHapticEffectType.idl
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/platform/gamepad/cocoa/CoreHapticsSoftLink.h
    A Source/WebCore/platform/gamepad/cocoa/CoreHapticsSoftLink.mm
    M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h
    M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm
    M Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm
    A Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.h
    A Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.mm
    A Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.h
    A Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Make Gamepad.vibrationActuator work with the GameController framework
https://bugs.webkit.org/show_bug.cgi?id=250217
rdar://problem/103973520

Reviewed by Brady Eidson.

Make Gamepad.vibrationActuator work with the GameController framework, so that
the gamepad now actually vibrates on macOS 13+.

This was tested manually using an XBox controller.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/gamepad/cocoa/CoreHapticsSoftLink.h: Added.
* Source/WebCore/platform/gamepad/cocoa/CoreHapticsSoftLink.mm: Added.
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h:
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm:
(WebCore::GameControllerGamepad::ensureHapticEngines):
(WebCore::GameControllerGamepad::playEffect):
(WebCore::GameControllerGamepad::stopEffects):
(WebCore::GameControllerGamepad::noLongerHasAnyClient):
* Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
(WebCore::GameControllerGamepadProvider::stopMonitoringGamepads):
* Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.h: Copied from Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h.
* Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEffect.mm: Added.
(WebCore::GameControllerHapticEffect::create):
(WebCore::GameControllerHapticEffect::GameControllerHapticEffect):
(WebCore::GameControllerHapticEffect::~GameControllerHapticEffect):
(WebCore::GameControllerHapticEffect::start):
(WebCore::GameControllerHapticEffect::stop):
(WebCore::GameControllerHapticEffect::strongEffectFinishedPlaying):
(WebCore::GameControllerHapticEffect::weakEffectFinishedPlaying):
* Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.h: Copied from Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h.
(WebCore::GameControllerHapticEngines::strongEngine):
(WebCore::GameControllerHapticEngines::weakEngine):
* Source/WebCore/platform/gamepad/cocoa/GameControllerHapticEngines.mm: Added.
(WebCore::GameControllerHapticEngines::create):
(WebCore::GameControllerHapticEngines::GameControllerHapticEngines):
(WebCore::GameControllerHapticEngines::playEffect):
(WebCore::GameControllerHapticEngines::stopEffects):
(WebCore::GameControllerHapticEngines::ensureStarted):
(WebCore::GameControllerHapticEngines::stop):

Canonical link: https://commits.webkit.org/258674@main




More information about the webkit-changes mailing list