1 #ifndef _sdl__sysjoy__interface__included__
2 #define _sdl__sysjoy__interface__included__
10 struct joystick_hwdata
;
12 typedef struct _SDL_Joystick
20 struct joystick_hwdata
* hwdata
;
27 #define SDL_HAT_RIGHTUP 2
28 #define SDL_HAT_RIGHT 3
29 #define SDL_HAT_RIGHTDOWN 4
30 #define SDL_HAT_DOWN 5
31 #define SDL_HAT_LEFTDOWN 6
32 #define SDL_HAT_LEFT 7
33 #define SDL_HAT_LEFTUP 8
34 #define SDL_HAT_CENTERED 0
36 typedef uint8_t Uint8
;
39 extern uint8_t SDL_numjoysticks
;
40 int SDL_PrivateJoystickAxis(SDL_Joystick
* j
, uint8_t axis
, int16_t value
);
41 int SDL_PrivateJoystickBall(SDL_Joystick
* j
, uint8_t ball
, int16_t dx
, int16_t dy
);
42 int SDL_PrivateJoystickHat(SDL_Joystick
* j
, uint8_t hat
, uint8_t val
);
43 int SDL_PrivateJoystickButton(SDL_Joystick
* j
, uint8_t button
, uint8_t state
);
44 void SDL_SetError(const char* err
);
46 int SDL_SYS_JoystickInit(void);
47 const char *SDL_SYS_JoystickName(int index
);
48 int SDL_SYS_JoystickOpen(SDL_Joystick
*joystick
);
49 void SDL_SYS_JoystickUpdate(SDL_Joystick
*joystick
);
50 void SDL_SYS_JoystickClose(SDL_Joystick
*joystick
);
51 void SDL_SYS_JoystickQuit(void);