mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 00:35:18 -05:00
Added SDL_GameControllerUpdate().
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user