Improved joystick detection.

Now you can plug in and unplug controllers all the time!