Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
This commit is contained in:
parent
2a4a81ad63
commit
34b88dfaae
30 changed files with 4191 additions and 580 deletions
|
@ -23,13 +23,15 @@
|
|||
/* Useful functions and variables from SDL_joystick.c */
|
||||
#include "SDL_joystick.h"
|
||||
|
||||
/* The number of available joysticks on the system */
|
||||
extern Uint8 SDL_numjoysticks;
|
||||
|
||||
/* Initialization and shutdown functions */
|
||||
extern int SDL_JoystickInit(void);
|
||||
extern void SDL_JoystickQuit(void);
|
||||
|
||||
/* Initialization and shutdown functions */
|
||||
extern int SDL_GameControllerInit(void);
|
||||
extern void SDL_GameControllerQuit(void);
|
||||
|
||||
|
||||
/* Internal event queueing functions */
|
||||
extern int SDL_PrivateJoystickAxis(SDL_Joystick * joystick,
|
||||
Uint8 axis, Sint16 value);
|
||||
|
@ -39,8 +41,11 @@ extern int SDL_PrivateJoystickHat(SDL_Joystick * joystick,
|
|||
Uint8 hat, Uint8 value);
|
||||
extern int SDL_PrivateJoystickButton(SDL_Joystick * joystick,
|
||||
Uint8 button, Uint8 state);
|
||||
|
||||
/* Helper function to let lower sys layer tell the event system if the joystick code needs to think */
|
||||
extern int SDL_PrivateJoystickNeedsPolling();
|
||||
|
||||
/* Internal sanity checking functions */
|
||||
extern int SDL_PrivateJoystickValid(SDL_Joystick ** joystick);
|
||||
extern int SDL_PrivateJoystickValid(SDL_Joystick * joystick);
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue