SDL - added new SDL_JoystickCurrentPowerLevel() API that returns the battery level of the selected joystick. Currently only implemented for XInput devices, other platforms are a TODO.

CR: Sam
This commit is contained in:
Sam Lantinga 2015-09-30 15:39:30 -07:00
parent 8038b8bb7f
commit bf785c766b
7 changed files with 127 additions and 8 deletions

View file

@ -41,6 +41,8 @@ extern int SDL_PrivateJoystickHat(SDL_Joystick * joystick,
Uint8 hat, Uint8 value);
extern int SDL_PrivateJoystickButton(SDL_Joystick * joystick,
Uint8 button, Uint8 state);
extern void SDL_PrivateJoystickBatteryLevel( SDL_Joystick * joystick,
SDL_JoystickPowerLevel ePowerLevel );
/* Internal sanity checking functions */
extern int SDL_PrivateJoystickValid(SDL_Joystick * joystick);