The macOS GameController haptics backend creates a Core Haptics continuous
event at the requested intensity, then refreshes an active effect by sending
CHHapticDynamicParameterIDHapticIntensityControl with that same
value. Apple applies that dynamic parameter as a multiplier on the
event intensity, so refreshing an effect at intensity 0.20 drops the output to
0.20 × 0.20 = 0.04.
Actual repeated playEffect()
calls at the same intensity weaken the rumble after the first refresh.
Expected repeated commands at the same intensity maintain steady vibration.
Connect a controller over Bluetooth, press a controller button, then choose a motor and intensity. Compare A and B while keeping the controller in hand. Each run lasts three seconds.
A replaces a 300 ms effect every 120 ms with zero start delay (exercises the refresh path). B sends the same commands with a 1 ms start delay (Chromium zeroes the previous effect first, so each command creates a fresh player). A single pulse provides a reference without refreshes.
Waiting for a controller.
Ready.
The page stops playback when it loses focus, becomes hidden, or detects a disconnect.
device/gamepad/game_controller_gamepad.mm:
CreateContinuousPlayer() bakes the requested intensity into the
CHHapticEvent. On the next SetVibration() the player
already exists, so UpdateHapticPlayer() sends
HapticIntensityControl with the requested value -- which
CoreHaptics multiplies with the event intensity instead of replacing it.
Fix: create the continuous event at intensity 1.0 and always apply the requested magnitude as the dynamic intensity parameter, so the multiplier resolves to the absolute requested level on both creation and refresh.