/* a3d_adc_cooked_read() copies the acis and button data to the callers arrays. It could do the read itself, but the caller could call this more than 50 times a second, which would use too much CPU.  */
static int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons)
/* a3d_adc_cooked_read() copies the acis and button data to the callers arrays. It could do the read itself, but the caller could call this more than 50 times a second, which would use too much CPU.  */
static int a3d_adc_cooked_read(struct gameport *gameport, int *axes, int *buttons)
{
	struct a3d *a3d = gameport->port_data;
	int i;
	for (i = 0; i < 4; i++)
		axes[i] = (a3d->axes[i] < 254) ? a3d->axes[i] : -1;
	*buttons = a3d->buttons;
	return 0;
}