Article View: comp.sys.amiga.tech
Article #12122Gameport.device joystick reading.
From: Brett S Bourbin
Date: Thu, 06 Apr 1989 18:46
Date: Thu, 06 Apr 1989 18:46
32 lines
2012 bytes
2012 bytes
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
Technical Details
Message-ID:
<3079@haven.umd.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!uflorida!haven!sylvester-tr.umd.edu!brettShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!uflorida!haven!sylvester-tr.umd.edu!brett From: brett@sylvester-tr.umd.edu (Brett S Bourbin) Newsgroups: comp.sys.amiga.tech Subject: Gameport.device joystick reading. Message-ID: <3079@haven.umd.edu> Date: 6 Apr 89 18:46:12 GMT Sender: news@haven.umd.edu Reply-To: brett@sylvester-tr.UMD.EDU (Brett S Bourbin) Organization: University of Maryland, College Park Lines: 32