I've read up a lot about the Raw Input API and so far could only tell that it bypasses os filters like mouse acceleration. However what i am looking for is a way to reduce input latency on mouse movement, and i cannot find any clear comments on whether switching to Raw Input will lower the input latency over the traditional windows messages.

  • \$\begingroup\$ Curious questions: How much latency do you have now? What is your target value? \$\endgroup\$
    – Andreas
    Commented Jul 3, 2016 at 19:52
  • \$\begingroup\$ @Andreas Have an example video: dl.dropboxusercontent.com/u/10190786/… By pausing it you can see roughly how far a frame stretches (the three cursors are rendered at different points in the frame time), and that even the most recent cursor is always lagging by a full frame. The code is online: github.com/wchristian/Microidium/tree/mouse_cursor Given that i'm not triple-buffering or doing VSync with even deeper buffers, i'd expect the ingame cursor to be within 1 frame of the system cursor. \$\endgroup\$
    – Mithaldu
    Commented Jul 4, 2016 at 1:09
  • \$\begingroup\$ I didn't get your video working (iPhone 5S). It is all black for 7s or so. As for the raw input I'd say yes, it probably has "lower" latency, but this is not its main purpose. How much lower I have no idea, could be <1ms. I'd suggest approximating the ingame cursor based on recent movement. Remember though the latency reference should be your ingame frame, not system cursor. I may look into this further because it is simply interesting but if I don't, good luck :-) \$\endgroup\$
    – Andreas
    Commented Jul 4, 2016 at 10:07
  • \$\begingroup\$ The video is a direct Fraps recording. If you have no native tools to convert it, maybe throw it at handbrake or youtube. And yes, i know, the main reason is to side-step things like acceleration. That said, i'm looking for a straight-forward yes/no answer based on hard facts. Maybe even narrow it down to "Does it provide latency lower than 16ms?" And i'm asking this, not only for myself, but to help others wondering the same find a definite answer on this. \$\endgroup\$
    – Mithaldu
    Commented Jul 5, 2016 at 14:54
  • 1
    \$\begingroup\$ Sidestepping acceleration may be the most common reason for using it, but its purpose is supporting more kinds of HID and provide more powerful customization of HID management, such as multiple mice support (a strange thing to do). Lower latency and overriding environment effects (acceleration) is at best a side-effect. This is probably why microsoft provide no latency numbers themselves. msdn.microsoft.com/en-us/library/windows/desktop/… \$\endgroup\$
    – Andreas
    Commented Jul 5, 2016 at 18:29


You must log in to answer this question.

Browse other questions tagged .