table of contents
other versions
SDL_GetGamepadPowerLevel(3) | SDL3 FUNCTIONS | SDL_GetGamepadPowerLevel(3) |
NAME¶
SDL_GetGamepadPowerLevel - Get the battery level of a gamepad, if available.
SYNOPSIS¶
#include "SDL3/SDL.h"
SDL_JoystickPowerLevel SDL_GetGamepadPowerLevel(SDL_Gamepad *gamepad);
FUNCTION PARAMETERS¶
- gamepad
- a gamepad identifier previously returned by SDL_OpenGamepad ()
RETURN VALUE¶
Returns the current battery level as
SDL_JoystickPowerLevel
on success or
SDL_JOYSTICK_POWER_UNKNOWN if it is unknown
AVAILABILITY¶
This function is available since SDL 3.0.0.
SDL 3.1.0 | SDL |