Fixed hat direction lookup

The event lookup was converting the wrong thing from SDL directions into local directions which prevented the hat events from working correctly.