supertux
|
Manages Joysticks. More...
#include <joystick_manager.hpp>
Public Member Functions | |
JoystickManager (InputManager *parent, JoystickConfig &joystick_config) | |
void | process_hat_event (const SDL_JoyHatEvent &jhat) |
void | process_axis_event (const SDL_JoyAxisEvent &jaxis) |
void | process_button_event (const SDL_JoyButtonEvent &jbutton) |
void | bind_next_event_to (Control id) |
void | set_joy_controls (SDL_JoystickID joystick, Control id, bool value) |
void | on_joystick_added (int joystick_index) |
void | on_joystick_removed (int instance_id) |
int | get_num_joysticks () const |
void | on_player_removed (int player_id) |
bool | has_corresponding_joystick (int player_id) const |
int | rumble (SDL_Joystick *joystick) const |
void | bind_joystick (SDL_Joystick *joystick, int player_id) |
std::unordered_map< SDL_Joystick *, int > & | get_joystick_mapping () |
Friends | |
class | KeyboardManager |
Manages Joysticks.
WARNING: Any edit done to this class should also be done to GameControllerManager!
int JoystickManager::rumble | ( | SDL_Joystick * | joystick | ) | const |