[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Joysticks!



On Fri, Nov 05, 2004 at 04:57:02PM +0000, Adam D. Moss wrote:
> * Is there any conventional wisdom for a reliable
> minimal 'deadzone' analogue joystick range?  I'm
> currently using +/- 4% but only have one (borrowed)
> joystick to test with.
> 

No idea really, but the SDL docs have this piece of code with
a 10% threshold:

  case SDL_JOYAXISMOTION:  /* Handle Joystick Motion */
  if ( ( event.jaxis.value < -3200 ) || (event.jaxis.value > 3200 ) ) 
  {
    /* code goes here */
  }
  break;


> * Do digital joysticks/joypads under SDL look like
> analogue joysticks except that their values always
> report totally-down (+32767), neutral (0),
> totally-up (-32768), etc?
> 

Yes.

Cheers,
Christian