mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 18:07:40 +00:00
Separate joystick power state into battery status and percentage
This allows you to see battery percentage while the controller is charging
This commit is contained in:
parent
5e624c2083
commit
8847b35244
42 changed files with 596 additions and 1001 deletions
|
@ -488,7 +488,8 @@ typedef struct SDL_JoyBatteryEvent
|
|||
Uint32 reserved;
|
||||
Uint64 timestamp; /**< In nanoseconds, populated using SDL_GetTicksNS() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
SDL_JoystickPowerLevel level; /**< The joystick battery level */
|
||||
SDL_PowerState state; /**< The joystick battery state */
|
||||
int percent; /**< The joystick battery percent charge remaining */
|
||||
} SDL_JoyBatteryEvent;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue