X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fgamepad.h;h=a7085a416e12af6bdd108db1842bdfe2b9d14e08;hb=f005034d4a3990efc8e445ce46222ce32600411b;hp=6b4993a8d163be76ad7ae92f2c4d2e4dbdae3f7f;hpb=5c28b6dbf7aa20441c8a51f484f4f64b1966f7e3;p=virtualjaguar diff --git a/src/gui/gamepad.h b/src/gui/gamepad.h index 6b4993a..a7085a4 100644 --- a/src/gui/gamepad.h +++ b/src/gui/gamepad.h @@ -11,11 +11,14 @@ #define JOY_KEY 0x000000 #define JOY_BUTTON 0x010000 #define JOY_HAT 0x020000 +#define JOY_AXIS 0x040000 -#define JOY_TYPE_MASK 0xFF0000 -#define JOY_BUTTON_MASK 0x00FFFF -#define JOY_HATNUM_MASK 0x0000F8 -#define JOY_HATBUT_MASK 0x000007 +#define JOY_TYPE_MASK 0xFF0000 +#define JOY_BUTTON_MASK 0x00FFFF +#define JOY_HATNUM_MASK 0x0000F8 +#define JOY_HATBUT_MASK 0x000007 +#define JOY_AXISNUM_MASK 0x00FFFE +#define JOY_AXISDIR_MASK 0x000001 #include #include "SDL.h" @@ -35,6 +38,7 @@ class Gamepad // Class methods... static void AllocateJoysticks(void); static void DeallocateJoysticks(void); + static const char * GetJoystickName(int joystickID); static bool GetState(int joystickID, int buttonID); static int CheckButtonPressed(void); static int GetButtonID(void); @@ -44,10 +48,13 @@ class Gamepad // Support up to 8 gamepads static int numJoysticks; static SDL_Joystick * pad[8]; + static const char * padName[8]; static int numButtons[8]; + static int numAxes[8]; static int numHats[8]; static bool button[8][256]; static uint8_t hat[8][32]; + static int32_t axis[8][32]; }; #endif // __GAMEPAD_H__