added support for PS3 controllers and fixed bug with reinitializing gamepad values