Applied advice from http://en.sfml-dev.org/forums/index.php?topic=6079.0, reduces lag when no joystick is connected a LOT.
However, because it's using "Clock::getElapsedTime" now SetThreadAffinityMask (from getCurrentTime) uses 9% CPU (which is still a lot). Maybe remove the calls and put something in the comments about the behavior of these functions under certain multi cores/processors (from what I read it only concerns AMD processors).
Reduce joystick connection polling to once per second (instead of onc…
…e per frame)
I've implemented another (similar) solution.
See commit 76e04a8
That's better, thanks :)