Repository navigation
fix(libSceVideoOut): coalesce controller output updates - #7632
Conversation
Every change of the pad output state sent a rumble, light bar and trigger effect update to SDL, and the trigger effect was sent again even when it had not changed. Titles that animate the light bar or drive rumble from haptic audio change that state every frame, so at 120 Hz about 110 reports a second were queued while SDL's HIDAPI rumble thread sends at most one per 10 ms. Different report kinds do not merge in its queue, so the backlog grew: rumble arrived ever later, and disconnecting the controller blocked the presenter until the queue drained. Updates now go out at most every 30 ms with the latest state, and the trigger effect is sent only when it changes or a controller connects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
The report says the trigger-effect deduplication fixed the SDL queue backlog, but the 30 ms limiter itself has not been run with the title. Since |
|
One retry edge in the new deduplication: SDL2 documents the return contract here: https://wiki.libsdl.org/SDL2/SDL_GameControllerSendEffect |
The 30 ms limit gated all controller output, so a rumble pulse shorter than the interval could be lost and a stop could wait up to 30 ms. Rumble goes out on every output change again, as on main; SDL already skips repeated values and merges consecutive rumble reports. Only the light bar is paced: a changed colour is sent at most every 30 ms, always the latest one, and a colour SDL refuses is retried after the interval. The trigger effect is cached only when SDL_GameControllerSendEffect succeeds, so a refused effect is sent again on the next update as it was before. LightBarPacer and TriggerEffectCache hold these decisions; pad_output_pacing covers changes, retries, a new controller and a light bar animated every frame at 120 Hz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@MarcZX10 thanks, both points were right; pushed 8540328.
Ran Dead Cells (PPSA15552) on Windows 11, DualSense over Bluetooth, with this version, #7633, and a local legacy vibration port change like #6860. Short On the overlap notice: #4891 touches only |
|
Checked the light bar pacing and the trigger effect cache in |
What
Every change of the pad output state sent a rumble, light bar and trigger effect update to SDL, and the trigger effect was sent again even when it had not changed. Titles that animate the light bar, or drive the trigger effect and rumble every frame, interleave different report kinds that do not merge in the queue of SDL's HIDAPI rumble thread, which sends at most one report per 10 ms. The backlog grew: rumble arrived later and later, and disconnecting the controller blocked the presenter inside
HIDAPI_DelDeviceuntil the queue drained.SDL_GameControllerSendEffectsucceeds, so a refused effect is sent again on the next update.SDL_GameControllerSetLEDrefuses is retried after the interval.LightBarPacerandTriggerEffectCache(header-only, no SDL) hold these decisions.pad_output_pacingcovers changes only, a refused first send followed by a successful retry, a reconnect, and a colour changed every frame at 120 Hz.Tested
Windows 11, MinGW GCC 15.2.0, DualSense over Bluetooth, Dead Cells (PPSA15552) at 120 FPS.
HIDAPI_DelDevice, rumble thread draining).scePadSetVibrationpulses, two within one second, both went out and stopped on time.pad_output_pacing.pad_output_pacingpasses, andcheck_conventionspasses.pr_overlap.pycould not run here (nogh).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code