8000 Gamepad API - add support for vibrationActuator · WebKit/WebKit@3120ab9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3120ab9

Browse files
committed
Gamepad API - add support for vibrationActuator
https://bugs.webkit.org/show_bug.cgi?id=248989 rdar://103423250 Reviewed by Brady Eidson and Alex Christensen. Turn on support for Gamepad.vibrationActuator on macOS 13+ now that it is supported on this platform. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebKit/Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultGamepadVibrationActuatorEnabled): * Source/WebKit/Shared/WebPreferencesDefaultValues.h: Canonical link: https://commits.webkit.org/258680@main
1 parent 5192e92 commit 3120ab9

File tree

3 files changed

+17
-1
lines changed
8000

3 files changed

+17
-1
lines changed

Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2302,11 +2302,12 @@ GamepadVibrationActuatorEnabled:
23022302
status: testable
23032303
humanReadableName: "Gamepad.vibrationActuator support"
23042304
humanReadableDescription: "Support for Gamepad.vibrationActuator"
2305+
condition: ENABLE(GAMEPAD)
23052306
defaultValue:
23062307
WebKitLegacy:
23072308
default: false
23082309
WebKit:
2309-
default: false
2310+
default: defaultGamepadVibrationActuatorEnabled()
23102311
WebCore:
23112312
default: false
23122313

Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,15 @@ bool defaultShowModalDialogEnabled()
199199
#endif
200200
}
201201

202+
#if ENABLE(GAMEPAD)
203+
bool defaultGamepadVibrationActuatorEnabled()
204+
{
205+
#if HAVE(WIDE_GAMECONTROLLER_SUPPORT)
206+
return true;
207+
#else
208+
return false;
209+
#endif
210+
}
211+
#endif
212+
202213
} // namespace WebKit

Source/WebKit/Shared/WebPreferencesDefaultValues.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ bool defaultVisualTranslationEnabled();
8585
bool defaultRemoveBackgroundEnabled();
8686
#endif
8787

88+
#if ENABLE(GAMEPAD)
89+
bool defaultGamepadVibrationActuatorEnabled();
90+
#endif
91+
8892
bool defaultShouldTakeSuspendedAssertions();
8993
bool defaultShowModalDialogEnabled();
9094

0 commit comments

Comments
 (0)
0