Scroll to navigation

SDL_GetJoystickPowerLevel(3) SDL3 FUNCTIONS SDL_GetJoystickPowerLevel(3)

NAME

SDL_GetJoystickPowerLevel - Get the battery level of a joystick as SDL_JoystickPowerLevel .

SYNOPSIS

#include "SDL3/SDL.h"
SDL_JoystickPowerLevel SDL_GetJoystickPowerLevel(SDL_Joystick *joystick);

FUNCTION PARAMETERS

the SDL_Joystick
to query

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