Won't Fix High polling rate mice and DirectInput

Status
Not open for further replies.
Running Win7x64 with a Logitech G500 mouse:

If I set my mouse polling to 1000 (1ms) SRB2 will periodically not register my mouse clicks if I am clicking faster than a certain rate (as fast as one might double click) but if I set my polling rate to 125 (8ms) I never seem to have a problem. I also noticed that if you turn DirectInput off via -nodinput I can run at a polling rate of 1000 with no issue (but then only the escape and enter keys work on my keyboard, so that's not a solution.)

It seems like DirectInput is having trouble scaling to higher mouse polling rates. Not a huge issue since I can change my polling rate, but it might cause issues for those who can't, or don't know how.
 
Last edited by a moderator:
Yeah, DirectInput polls the mouse, whereas using -nodinput uses the Windows message buffer. Since SRB2 runs at 35fps (1000ms/35 = 28.57142857142857ms), any polling rate faster than 28ms is probably going to cause some things not to register if you're quick enough on your press and release.

Unfortunately, the solution to this is probably to have a separate thread that polls the DirectInput devices at a much faster pace than the game loop and buffers them into events. This is probably beyond the length that STJr would be willing to go to fix it.
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top