added code to handle the case when no (capable) joystick is plugged in