On Thu Dec 12 10:38:00 2024 +0000, Rémi Bernon wrote:
Fwiw I think we could increase the check frequency a bit, as there's indeed now some higher polling rate input devices out there. Something like this maybe?
/* get driver event check time for throttling */ static inline DWORD get_driver_check_time(void) { LARGE_INTEGER counter, freq; NtQueryPerformanceCounter( &counter, &freq ); return counter.QuadPart * 8000 / freq.QuadPart; /* 8kHz */ }
I was just playing it safe; I wasn't sure at what frequency the X server overhead you mentioned became a concern. If 8000hz is under that threshold, I entirely agree with that suggested value.
Otherwise, why do we need to worry about `freq` if it's hardcoded to TICKSPERSEC = 1ms? I see a lot of other occurrences where we pass NULL here.