With Valve releasing games on Linux, I have been playing a bit of Left 4 Dead 2 and Portal 2, and I noticed a small, but still sensible mouse lag (delay) when I don't enable the Raw mouse input option. Another game I have been playing on Linux, Starbound, also has a similar mouse lag on Linux only. I have been looking around for information about raw input, but I'm still a bit puzzled.
From what I've gathered (for example here), a common way of getting raw hardware input is to read the */dev/input/event** files. The catch is that on my system (Fedora 20) these files are only readable to the root group, and I didn't create a udev rule as mentionned in the linked post.
So my question is:
How does the game read raw input from the mouse? Is there another way than /dev/input
?
Is there a cross-platform way to do it?
Bonus questions (I'm about to look it up by myself anyway =) ):
What OS mechanism provides "standard" input? e.g. What does the SDL or other library rely on to gather input from the hardware?
ps: Portal 2's Raw mouse input option doesn't actually work so far in the beta, which is why I've started looking around the matter. It does work in L4D2, though.