Beispiel #1
0
SetJoystick::~SetJoystick()
{
    deleteSticks();
    deleteVDpads();
    deleteButtons();
    deleteAxes();
    deleteHats();
}
Beispiel #2
0
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);
    }
}
Beispiel #3
0
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);
    }
}