Original Post
I''m having some trouble with DirectInput
I''ve always had problems when something bogs down the system while I was dragging something with the mouse (in my DirectX program). The button would not register as being released while the system was halted for those few seconds.
I tried tracking down the problem and I think I found it. I''m guessing that every time the mouse axis moves, it adds another DIDEVICEOBJECTDATA entry to the buffered array. I''m also guessing that the mouse itself is polled by the hardware and sends these entries at its own timed intervals. So when the system lagged, as I drag the mouse, I add a DIDEVICEOBJECTDATA entry every -so so- milliseconds, overflowwing the buffer, then when I release the button, it''s cut off from the data.
Is this true? If so, how can I estimate a decent buffer size? How can I know how fast the mouse sends updates? If I knew the mouse sent an update every so many milliseconds, I could allow a lag of a specific time to go by without dropping off data. Do all input devices poll (hardware) at about the same rate?
Should I create a buffer of 10? 100? 1000? Even more? Since any input device can have an axis or five, do I multiply this number with the number of axes?
Sorry, I''m just a little confused
Any help is appreciated.