SRB2 Message Board  

Go Back   SRB2 Message Board > Archived > SRB2 Forum Archives > Bug Reports (2.0.X)

Thread Tools Search this Thread
Old 10-10-2011   #1
koopa badnik
Default High polling rate mice and DirectInput

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 Callum; 01-05-2012 at 08:29 AM.
koopa badnik is offline  
Old 10-10-2011   #2
What part of 'RETIRED' don't you understand?
SSNTails's Avatar

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.
Roly Poly Putt & TraceRace - Now out for Android, iPhone, iPad, and iPod Touch -
Follow me on twitter:

Last edited by SSNTails; 10-10-2011 at 05:47 PM.
SSNTails is offline  
Old 01-05-2012   #3
Don't bug me about ports
Callum's Avatar

AJ has it, I guess. IMO you don't need mouse polling times that fast anyway ;P
Wii Number: 6332-6670-3012-6583
Super Smash Bros. Brawl: 0990-2469-0325
Pokémon SoulSilver (Japanese): 4297-2659-8884

Nintendo 3DS: 4725-7969-6387
Callum is offline  
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:43 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.