oblitum / Interception

The Interception API aims to build a portable programming interface that allows one to intercept and control a range of input devices.
http://oblita.com/interception
1.33k stars 271 forks source link

Does Interception add any latency? #77

Closed Revvilo closed 5 years ago

Revvilo commented 5 years ago

I'm using Interception to create macros for use while gaming, so I'm interested to know; does having the driver installed and/or intercepting inputs add any latency to inputs that aren't being intercepted?

I apologise if there is information elsewhere about this, but I've looked everywhere to no avail and hoped this would be the best option.

oblitum commented 5 years ago

I never benchmarked this, but I expect there should be some difference, since events travel from kernel mode to user mode then back to kernel before hitting the Windows raw input thread. That's one of the reasons for raising process priority when using the library. Though I think it should be pretty fast because I've never hit any latency issue in normal use, in-game or with fast automated drawing like in the screenshots in the README. If you don't raise process priority or don't handle input fast enough, then off course you'll hit lag.

Revvilo commented 5 years ago

I'm using AutoHotInterception for creating macros. I assume the library is in use there, so just to make sure, do I need to check that the priority is set properly on the AHK process or something else? That is if it isn't already at a high priority by default, of course.

oblitum commented 5 years ago

Yeah, you should check.

oblitum commented 5 years ago

Process priority may be raised manually through process manager too.