joystick.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. Copyright (C) 2005, 2010 - Cryptic Sea
  3. This file is part of Gish.
  4. Gish is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. See the GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15. */
  16. void checkjoystick(void);
  17. int numofjoysticks;
  18. SDL_Joystick *joy[16];
  19. int joystickenabled;
  20. int joystickused;
  21. struct {
  22. int x;
  23. int y;
  24. float axis[2];
  25. int throttle;
  26. int numofbuttons;
  27. int button[32];
  28. int numofhats;
  29. int hat[4];
  30. char name[64];
  31. } joystick[16];
  32. struct {
  33. int x;
  34. int y;
  35. float axis[2];
  36. int throttle;
  37. int numofbuttons;
  38. int button[32];
  39. int numofhats;
  40. int hat[4];
  41. char name[64];
  42. } prevjoystick[16];