Joystick hat constants

Hey, does anyone have code that would be seriously broken if we changed
the joystick hat constants?

Ack, Heavy Gear II.

Anyway, here is the comment:

Also pondering adding sdl joystick handling, but I was somewhat confused
by the SDL_JoystickGetHat comments in SDL/SDL_joystick.h. The return values
seem pretty arbitrary and hard to manage. Wouldn’t it be a easier to have
defines like SDL_HAT_LEFT, etc… then instead
of this have this
8 1 2 SDL_HAT_LEFT|SDL_HAT_UP SDL_HAT_UP SDL_HAT_RIGHT|SDL_HAT_UP
7 0 3 SDL_HAT_LEFT 0 SDL_HAT_RIGHT
6 5 4 SDL_HAT_LEFT|SDL_HAT_DOWN SDL_HAT_DOWN SDL_HAT_RIGHT|SDL_HAT_DOWN

I can easily enough add 8 symbolic constants that people can check against.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

You know, I was wondering what the hell those got set to when I was
writing the joystick code for SoF. I even ended up poring through the
kernel source at the joystick structures to see what happens…

m.On Sat, Apr 01, 2000 at 08:20:48PM -0800, Sam Lantinga wrote:

Hey, does anyone have code that would be seriously broken if we changed
the joystick hat constants?


Programmer “Ha ha.” “Ha ha.” "What are you laughing at?"
Loki Software "Just the horror of being alive."
http://lokigames.com/~briareos/ - Tony Millionaire