Corrected bugs in PyGame event handling and added event for detecting a new joystick config.