rem: fprintf (stderr, "VControl: Attempted to bind to illegal direction\n");
context: VControl_AddJoyHatBinding (int port, int which, Uint8 dir, int *target){	if (port >= 0 && port < joycount)	{		joystick *j = &joysticks[port];		if (!(j->stick))			create_joystick (port);		if ((which >= 0) && (which < j->numhats))		{			if (dir == SDL_HAT_LEFT)			{				add_binding(&joysticks[port].hats[which].left, target);			}			else if (dir == SDL_HAT_RIGHT)			{				add_binding(&joysticks[port].hats[which].right, target);			}			else if (dir == SDL_HAT_UP)			{				add_binding(&joysticks[port].hats[which].up, target);			}			else if (dir == SDL_HAT_DOWN)			{				add_binding(&joysticks[port].hats[which].down, target);			}			else			{				fprintf (stderr, "VControl: Attempted to bind to illegal direction\n");				return -1;			}			return 0;		}		else		{			fprintf (stderr, "VControl: Attempted to bind to illegal hat %d\n", which);			return -1;		}	}	else	{		fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);		return -1;	}}