home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 499.lha / GamePortDeviceToolKit / gameport.lzh / src / DeviceToolKits / GamePort / test_proto / test10.c < prev    next >
C/C++ Source or Header  |  1991-01-03  |  615b  |  38 lines

  1. #include <stdio.h>
  2.  
  3. #include "DeviceToolKits/GamePort.h"
  4. #ifndef  TESTPROTO
  5. #define  NO_PRAGMAS  1
  6. #endif
  7. #include "DeviceToolKits/proto/GamePort.h"
  8. #include "DeviceToolKits/GamePortBase.h"
  9.  
  10. LONG  joy0val;
  11. LONG  joy1val;
  12.  
  13. main(argc,argv)
  14. int   argc;
  15. char  *argv[];
  16. {
  17.  
  18. #ifdef   TESTSHARED
  19. /*  Open the GamePort library  */
  20.  
  21.    DTGamePortOpen(DTGAMEPORTREV);
  22. #endif
  23.  
  24. /*  Read the joystick ports  */
  25.  
  26.    while (1) {
  27.       joy0val = DTGamePortDJoy(0L);
  28.       joy1val = DTGamePortDJoy(1L);
  29.       printf("Joy0: %x  Joy1: %x\n",joy0val,joy1val);
  30.       Delay(25L);
  31.    }
  32.  
  33. #ifdef   TESTSHARED
  34.    DTGamePortClose();
  35. #endif
  36. }
  37.  
  38.