SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SDLController Class Reference

Public Member Functions

 SDLController (int device_id)
 
const irr::SEvent & getEvent () const
 
SDL_JoystickID getInstanceID () const
 
void handleAxisInputSense (const SDL_Event &event)
 SDL only sends event when axis moves, so we need to send previously saved event for correct input sensing.
 
bool handleAxis (const SDL_Event &event)
 
bool handleHat (const SDL_Event &event)
 
bool handleButton (const SDL_Event &event)
 
SDL_GameController * getGameController () const
 
void checkPowerLevel ()
 
void doRumble (float strength_low, float strength_high, uint32_t duration_ms)
 
GamePadDevicegetGamePadDevice () const
 

Private Member Functions

void updateAutoCenter (int state)
 

Private Attributes

SDL_GameController * m_game_controller
 
SDL_Joystick * m_joystick
 
GamePadDevicem_gamepad
 
SDL_Haptic * m_haptic
 
int m_auto_center
 
int m_buttons
 
int m_axes
 
int m_hats
 
SDL_JoystickID m_id
 
irr::SEvent m_irr_event
 
int16_t m_prev_axes [irr::SEvent::SJoystickEvent::NUMBER_OF_AXES]
 
uint64_t m_last_power_level_time
 

The documentation for this class was generated from the following files: