Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!decwrl!uunet!mcsun!cernvax!cernvax.cern.ch From: hohr@cernvax.cern.ch (roger hoh) Newsgroups: comp.sys.atari.st Subject: evnt_button() continued... Message-ID: <4074@cernvax.cern.ch> Date: 5 Feb 91 20:14:24 GMT Sender: news@cernvax.cern.ch Organization: CERN, European Laboratory for Particle Physics Lines: 44 Thanks for your reply Claus. Here is the code I use (well, a part of it, 'cause it's too long to by send to the net). The weird thing is that it works with button 1 (the left one) but not for button 2 (the right one). In fact, the right one seems to be the same as the joystick 'fire' button.(am I right?) I wanna put a other switch at the joystick's place to start a chronometer with the foot ('cause hands are occupied by a blood analysis, but that's an other story). Thanks in advance for your help. Roger hohr@cernvax.cern.ch /********************* cut here ***********************/ /* compiled with MWC (option -VGEM) */ #include #include #include /* this .h file contains all the init. stuff needed by AES&VDI */ #define NBR_OF_TESTS 12 main() { int i, nw; int breturn; int bclicks = 2; /* wait for n clicks */ unsigned int bmask = 2; /* survey button n */ /* with bmask = 1, it's OK */ unsigned int bstate = 1; /* button pressed (0 = no, 1 = yes) */ gem_init (); /* in gem_inex.h */ for (i = 0; i < NBR_OF_TESTS; i++) { breturn = evnt_button (bclicks, bmask, bstate, &nw, &nw, &nw, &nw); printf ("Test Nr.%02d/%d. Return value: 0x%04x\n", i+1, NBR_OF_TESTS, breturn); } printf("Hit return!\n"); getchar(); gem_exit (); /* in gem_inex.h */ }