Reduce joystick connection polling to once per second #210

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@speps
speps commented Apr 17, 2012

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).

@LaurentGomila
Member

I've implemented another (similar) solution.

See commit 76e04a8

@speps
speps commented May 13, 2012

That's better, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment