Back to index

supertuxkart  0.5+dfsg1
Public Member Functions | Public Attributes
SDLDriver::StickInfo Class Reference
Collaboration diagram for SDLDriver::StickInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StickInfo (int)
 ~StickInfo ()

Public Attributes

SDL_Joystick * sdlJoystick
std::string * id
int deadzone
int index
AxisDirectionprevAxisDirections

Detailed Description

Definition at line 44 of file sdldrv.hpp.


Constructor & Destructor Documentation

Definition at line 714 of file sdldrv.cpp.

{
       sdlJoystick = SDL_JoystickOpen(sdlIndex);
       
       id = new string(SDL_JoystickName(sdlIndex));
       
       const int count = SDL_JoystickNumAxes(sdlJoystick);
       prevAxisDirections = new AxisDirection[count];
       
       for (int i = 0; i < count; i++)
              prevAxisDirections[i] = AD_NEUTRAL;
       
       deadzone = DEADZONE_JOYSTICK;
       
       index = -1;
}

Definition at line 731 of file sdldrv.cpp.

{
       delete id;
       
       delete prevAxisDirections;
       
       SDL_JoystickClose(sdlJoystick);
}

Member Data Documentation

Definition at line 50 of file sdldrv.hpp.

Definition at line 48 of file sdldrv.hpp.

Definition at line 52 of file sdldrv.hpp.

Definition at line 54 of file sdldrv.hpp.

Definition at line 46 of file sdldrv.hpp.


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