SDL 3.0
SDL_JoyBatteryEvent Struct Reference

#include <SDL_events.h>

Data Fields

SDL_EventType type
 
Uint32 reserved
 
Uint64 timestamp
 
SDL_JoystickID which
 
SDL_PowerState state
 
int percent
 

Detailed Description

Joysick battery level change event structure (event.jbattery.*)

Since
This struct is available since SDL 3.0.0.

Definition at line 573 of file SDL_events.h.

Field Documentation

◆ percent

int SDL_JoyBatteryEvent::percent

The joystick battery percent charge remaining

Definition at line 580 of file SDL_events.h.

◆ reserved

Uint32 SDL_JoyBatteryEvent::reserved

Definition at line 576 of file SDL_events.h.

◆ state

SDL_PowerState SDL_JoyBatteryEvent::state

The joystick battery state

Definition at line 579 of file SDL_events.h.

◆ timestamp

Uint64 SDL_JoyBatteryEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 577 of file SDL_events.h.

◆ type

SDL_EventType SDL_JoyBatteryEvent::type

SDL_EVENT_JOYSTICK_BATTERY_UPDATED

Definition at line 575 of file SDL_events.h.

◆ which

SDL_JoystickID SDL_JoyBatteryEvent::which

The joystick instance id

Definition at line 578 of file SDL_events.h.


The documentation for this struct was generated from the following file: