[comp.sys.amiga.tech] Gameport.device joystick reading.

brett@sylvester-tr.umd.edu (Brett S Bourbin) (04/07/89)

While writing a program that uses the joystick to zoom in and out of
a 3d maze, I chose to use the relative joystick, instead of the absolute
one.  The absolute joystick will only register one message for each time
one of the triggers is satisfied.  When moving in the maze, this is not
a acceptable approach.

The relative joystick reports too many messages, so that if I press the
stick forward for a second, it will move forward way after the stick 
goes back to the rest position.  Is this repeat count and delay tied to
the system-configuration for the keyboard repeat values?  I tried making 
the trigger values greater, but I still want to move through the maze 
in small steps, if the joystick is press a little at a time.

Is there a way to change the repeat rates of the joystick, so that it
is altered _Only When the Program is Running_?  I don't want the user to
have to change his/her configuration to use the joystick.

While I am at it, is there a way to flush the message buffer before I
start to do my first read.  When I execute my program for the first time
it is fine, but on any future executions, it still has old messages 
waiting and will move in the maze before touching the joystick.

Thanks in advance.

--Brett S Bourbin
 __  __   _  __  _  Instructional Computing Programs -- Univ of Maryland
|  ||  | / ||  || \
|  ||  ||  ||  ||  |  INTERNET: brett@SYLVESTER-TR.UMD.EDU
|  ||  ||  ||  ||  |            bbourbin@UMD5.UMD.EDU
 \_||_/ |__||__||__|       BIX: brettb
    College Park        BITNET: bbourbin@UMDD