Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

SDL_JoyBatteryEvent - Joystick battery level change event structure (event.jbattery.*)

Availability

       This struct is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                         SDL_JoyBatteryEvent(3type)

Name

       SDL_JoyBatteryEvent - Joystick battery level change event structure (event.jbattery.*)

Synopsis

#include<SDL3/SDL_events.h>typedefstructSDL_JoyBatteryEvent{SDL_EventTypetype;/**<SDL_EVENT_JOYSTICK_BATTERY_UPDATED*/Uint32reserved;Uint64timestamp;/**<Innanoseconds,populatedusingSDL_GetTicksNS()*/SDL_JoystickIDwhich;/**<Thejoystickinstanceid*/SDL_PowerStatestate;/**<Thejoystickbatterystate*/intpercent;/**<Thejoystickbatterypercentchargeremaining*/}SDL_JoyBatteryEvent;

See Also