Added support for multiple hats (NEED TO TEST)

This code hasn't been tested yet.  I don't have my joystick with me at the
moment, but I can test it soon.