Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Added SDL_GameControllerUpdate().
  • Loading branch information
icculus committed Feb 25, 2013
1 parent 782d413 commit cd758dabe039bd8e96946ed05e58f1114cc40f62
Showing with 19 additions and 0 deletions.
  1. +9 −0 include/SDL_gamecontroller.h
  2. +10 −0 src/joystick/SDL_gamecontroller.c
@@ -160,6 +160,15 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameCont
*/
extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);

/**
* Update the current state of the open game controllers.
*
* This is called automatically by the event loop if any game controller
* events are enabled.
*/
extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);


/**
* The list of axii available from a controller
*/
@@ -824,6 +824,16 @@ SDL_GameControllerOpen(int device_index)
return (gamecontroller);
}

/*
* Manually pump for controller updates.
*/
void
SDL_GameControllerUpdate(void)
{
/* Just for API completeness; the joystick API does all the work. */
SDL_JoystickUpdate();
}


/*
* Get the current state of an axis control on a controller

0 comments on commit cd758da

Please sign in to comment.