SetJoystick::~SetJoystick() { deleteSticks(); deleteVDpads(); deleteButtons(); deleteAxes(); deleteHats(); }
void SetJoystick::refreshAxes() { deleteAxes(); //for (int i=0; i < SDL_JoystickNumAxes(joyhandle); i++) for (int i=0; i < device->getNumberRawAxes(); i++) { JoyAxis *axis = new JoyAxis(i, index, this); axes.insert(i, axis); enableAxisConnections(axis); } }
void SetJoystick::refreshAxes() { deleteAxes(); InputDevice *device = getInputDevice(); for (int i=0; i < device->getNumberRawAxes(); i++) { JoyAxis *axis = new JoyAxis(i, index, this, this); axes.insert(i, axis); if (device->hasCalibrationThrottle(i)) { JoyAxis::ThrottleTypes throttle = device->getCalibrationThrottle(i); axis->setInitialThrottle(throttle); } enableAxisConnections(axis); } }