June 16, 2026
6:45 p.m.
On Tue Jun 16 19:02:48 2026 +0000, Shaun Ren wrote:
We're only locking all of them for addition/removal path; it is possible for the update thread to be in `read_controller_state()` for a controller while the game calls GetState for another controller, and using a global CS here would cause the game's GetState call to stall. I did some basic instrumentation on this. During my one minute testing with RiME, the times took for `read_controller_state()` to complete is on average 23+/-32 us, however there were 11 spikes above 500 us, with the maximum almost 2 ms.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11158#note_143302